Category: Composer 2
-
Post Views: 31 Step 1: Create a local project directory in WSL (such as ~/wwwroot/hyperf-skeleton) 2. Modify the mount directory and adapt the path to the local directory. Reference:Hyperf official documentation development under Docker . 3. Create a project in the container, the creation of the project fails, and an error is reported: Your requirements could not be resolved to…
-
Post Views: 18 1. In spatie\QueryBuilder, an error is reported: call to undefined method spatie\QueryBuilder\\AllowedFilter::endsWithStrict(). as shown in Figure 1 2. Search in vendor/spatie/laravel-query-builder/src/allowedFilter.php: EndsWithStrict, confirm that the EndsWithStrict method does not exist. 3. Check composer.json , “spatie/laravel-query-builder”: “^5.2”, . Use composer to automatically update to the latest compatible version of the package, 5.2.0 => 5.7.0. as shown in Figure…
-
Post Views: 11 1. When executing: composer install, prompt: enqueue/rdkafka 0.10.19 requires ext-rdkafka -> It is missing from your system. install or enable phps rdkafka extension.. as shown in Figure 1 2. Decide to enable PHP’s RDKAFKA extension. Open:https://pecl.php.net/package/rdkafka/6.0.1/windows, download 7.4 Thread Safe (ts) x64. After decompressing php_rdkafka-6.0.1-7.4-ts-vc15-x64, put php_rdkafka.dll Copy to: C:\php-7.4.27\ext\php_rdkafka.dll. Then edit php.ini, add extension=rdkafka 3. When…
-
Post Views: 155 1. There is a Shopify PHP application, which can already be previewed in the development environment. as shown in Figure 1 2. Now it is ready to be deployed to the production environment. Shopify recommends creating a separate application if you need to deploy the application to the production environment. This application shares the code base with…
-
Post Views: 13 1. In Laravel 6, there is a simple implementation based on the judgment that the string contains ? 2. However, this implementation, some complex URIs are not considered. Example: ?d=3&e=5#6, will be replaced with: ?d=3&e=5#6&d=https://xxx.com. 3. The final decision is to add query parameters based on the League/URI, and execute the composer require League/uri-components and composer require…
-
Post Views: 18 1. After executing composer require, in composer.lock, plugin-api-version changes from 2.3.0 to 2.2.0 . as shown in Figure 1 2. The plugin-api-version attribute in the file helps ensure compatibility between dependencies and plugins, which is essential for maintaining stability and efficiency. Decided to avoid changes to plugin-api-version as much as possible. Execute composer self-update to update the…
-
Post Views: 62 1. Generate a new module: blog. 2. By default, the module class will not load automatically. You can load your modules automatically using PSR-4. Edit composer.json. as shown in Figure 1 3. Tip: Don’t forget to run composer dump-autoload. as shown in Figure 2 4. Generate a given console command for the specified module. 5. Edit CreatePostCommand.php,…
-
Post Views: 18 1. In Laravel 6 , error: E:\\wwwroot\\object\\vendor\\ramsey\\uuid\sr c\\converter\\number\\degradedNumberConverter.php”, “class”: “ramsey\Uuid\\Exception\\UnsatisfiedDependencyException as shown in Figure 1 2. In the build production environment, execute: composer install –prefer-dist –no-ansi –no-interaction –no-progress –no-scripts –no-dev. 3. In Composer.json’s require configuration, add “moontoast/math”. Execute: composer require moontoast/math. Execute again: composer install –prefer-dist –no-ansi –no-interaction –no-progress –no-scripts –no-dev. No more errors.
-
Post Views: 18 1. In the CI/CD Pipelines of GitLab, the build composer fails. as shown in Figure 1 2. Search the class in the local environmentFaker\Factory, to confirm that /vendor/fzaninotto/faker/src/faker/factory.php exists. Execute in the local environment: php artisan key:generate succeeds. as shown in Figure 2 3. Check the log in gitlab-runner, if[ ! -x “vendor” ];then echoVendor not exists;…