• Composer installation too slow? ultimate solution


    essential tool: ssr When many people use composer to download packages, they encounter the problem that the speed is very slow and basically unusable. Most of the solutions on the Internet suggest replacing the Chinese image, but it is still very difficult to use. Set composer to the original mirror addresscomposer config -g repo.packagist composer […]

  • Implementing Blockchain Applications Using Hyperledger Fabric and Composer


    One area of ​​technology that cannot be bypassed at the moment is the topic of blockchain. But beyond cryptocurrencies, there are many more interesting applications that could lead to many exciting software ecosystems. This also applies to the Hyperledger project, which provides a very modular blockchain framework. Let’s see how easy it is to implement […]

  • Composer China’s full mirror image is open source, let’s make the PHP community more prosperous together


    First link: https://github.com/zencodex/c… The ZComposer image was born in March 2017 and has been running for more than 2 years. This is not a very technical thing, so let’s briefly talk about some development and problem-solving ideas, hoping to inspire you a little. If you feel that you have gained something, please click the mouse […]

  • 12. Laravel full-text search Elasticsearch (3)


    Use the Elasticsearch search engine, configure ik Chinese word segmentation, associate with the Laravel model, and then implement the business logic of the search. This article is the end, use Laravel’s Scout extension package to complete the search function Continuing from the previous article, Scout and the extension package supporting Elastic have been installed and […]

  • Using laravel in Repository mode


    laravel-repository Warehouse address Github Repository document address clear directory structure ModelsOnly responsible for defining the model(such as: model association, scope, get and set attribute, etc.) Repository is responsible for processing this tableAll related business logic, not only injecting the model, but any cache related to redis can be injected, and the code is located quickly […]

  • How does PHP realize the flexible application of .env files in projects


    First composer installation composer require vlucas/phpdotenv Then look at the official documentation of phpdotenv https://packagist.org/package… example $dotenv = Dotenv\Dotenv::create(__DIR__, ‘.env’); $my_env = $dotenv->load(); var_dump($my_env);

  • How does PHP realize the flexible application of Aliyun SMS SDK in the project


    install first composer require alibabacloud/sdk Then look at the alibabacloud official website documentation https://packagist.org/package… example My_composer_aliyunsms.php <?php // use Swoft\Task\Bean\Annotation\Task; // use AlibabaCloud\Client\AlibabaCloud; // use AlibabaCloud\Client\Exception\ClientException; // use AlibabaCloud\Client\Exception\ServerException; use AlibabaCloud\Client\AlibabaCloud; use AlibabaCloud\Client\Exception\ClientException; use AlibabaCloud\Client\Exception\ServerException; use AlibabaCloud\Ecs\Ecs; /** * Ali information sending class * @Task(“ali”) */ class My_composer_aliyunsms { /** * Send SMS verification code […]

  • Error proc_open(): fork failed – Cannot allocate memory after installing composer


    1. Problem description: When using composer to deploy the yii project on the linux server, “proc_open(): fork failed – Cannot allocate memory” That is, it prompts “Insufficient memory”, we can solve this problem by creating a swap partition. 2. Solution: run firstfree -msee how much space Run the following three commands in sequence in the […]

  • Composer server failed to install extension (upgrade process with too low version)


    ps : server configurationLinux VM-0-9-ubuntu 4.4.0-91-generic #114-Ubuntu SMP Tue Aug 8 11:56:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux 1. Failure experience During the installation of easyswoole, it was found that it could not be installed through composer The error message is as follows: [email protected]:~/demo/easyswoole$ composer require easyswoole/easyswoole=3.x ./composer.json has been created Loading composer repositories with […]

  • Composer/Packagist latest domestic source


    foreword Due to the recentlaravel-chinaThere is an unstable situation there (it is not clear whether it has been restored), which makes it unable to use normallycomposer。 cloud service provider packagist.phpcomposer.com packagist.laravel-china.org The above services are unstable (it is not clear whether they have been restored), and major domestic cloud service providers have provided relevant service […]

  • Composer updates the specified dependency package


    compoesrofrequire/updateBoth can update the specified dependency package (upgrade/downgrade). requireIt is more flexible, if it is not installed, it will be installed, if it is installed, it will be carried out according to the version number passed inupgradeordowngrade。updateThen you cannot pass the specified on the command lineversion number, you need to manually edit thecomposer.json, specifying a […]

  • Publish your own Composer package


    I. Introduction Because recently, I and my colleagues have accumulated a lot of high-quality and practical codes during the development process. These codes have been polished for several years, and some have dozens or even hundreds of lines. When the project needs to use these codes, it can’t go anywhere or copy them, so it’s […]