Home > Development Tools > composer > Some composer errors and solutions

Some composer errors and solutions

藏色散人
Release: 2019-12-26 17:09:20
forward
4991 people have browsed it

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!

Some composer errors and solutions

Problem 1

Execute the following command:

composer require sonata-project/doctrine-orm-admin-bundle "2.3.*"
Copy after login

Error report:

PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 32 bytes)
Copy after login

Solution:

php -r "echo ini_get('memory_limit').PHP_EOL;"  # 查看memory大小
COMPOSER_MEMORY_LIMIT=-1 composer require sonata-project/doctrine-orm-admin-bundle  # 临时设置memory大小
Copy after login

See the official instructions (too slow to open):

https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors
Copy after login

Problem 2

but these conflict with your requirements or minimum-stability.
Copy after login

Solution: Add the following to composer.json

"minimum-stability": "dev",
Copy after login

Switch composer domestic mirror

composer config -g repo.packagist composer https://packagist.phpcomposer.com
Copy after login

For more composer-related technical articles, please visit the composer column: //m.sbmmt.com/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!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template