Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The problem of error reporting in composer and its solution

Shulou Source: shulou.com Published: 2022-06-02 16:41:15 10月02日 Update

This article mainly introduces the error reporting problem of composer and its solutions. It is very detailed and has a certain reference value. Interested friends must read it!

Question 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)

Resolve:

Php-r "echo ini_get ('memory_limit'). PHP_EOL;" # View memory size COMPOSER_MEMORY_LIMIT=-1 composer require sonata-project/doctrine-orm-admin-bundle # temporarily set memory size

See the official instructions (opening is too slow):

Https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors

Question 2

But these conflict with your requirements or minimum-stability.

Solution: add the following to composer.json

"minimum-stability": "dev"

Switch composer domestic mirrors

Composer config-g repo.packagist composer https://packagist.phpcomposer.com above is all the contents of this article entitled "error reporting problems and Solutions of composer". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Questions methods content size articles values interests commands officials guys partners more knowledge industry information information channels mirrors channels switching reference Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Technology Apple Xiaomi MariaDB