Home > Article > Development Tools > Some composer errors and solutions
The following tutorial column of composer will introduce to you some errors and solutions of composer. I hope it will be helpful to friends in need!
Problem 1
Execute the following command:
composer require sonata-project/doctrine-orm-admin-bundle "2.3.*"
Error report:
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 32 bytes)
Solution:
php -r "echo ini_get('memory_limit').PHP_EOL;" # 查看memory大小 COMPOSER_MEMORY_LIMIT=-1 composer require sonata-project/doctrine-orm-admin-bundle # 临时设置memory大小
See the official instructions (too slow to open):
https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors
Problem 2
but these conflict with your requirements or minimum-stability.
Solution: Add the following to composer.json
"minimum-stability": "dev",
Switch composer domestic mirror
composer config -g repo.packagist composer https://packagist.phpcomposer.com
For more composer-related technical articles, please visit the composer column: https://www.php.cn/tool/composer/
The above is the detailed content of Some composer errors and solutions. For more information, please follow other related articles on the PHP Chinese website!