Answer the question
In order to leave comments, you need to log in
How to temporarily allocate more php memory for composer install?
The situation is this, the project is on Symfony and when composer install is called, it is executed auto-scripts, cache:clear
for which there is not enough memory.
How can I allocate more memory for composer install?
I tried this:
php -d memory_limit=256M bin/composer install
But the setting in this form is simply ignored and the default value of memory_limit is used.
However, if you call cache:clear directly:
php -d memory_limit=256M bin/console cache:clear
Then everything works.
PS I know that you can remove the call to the cache:clear script from composer and do it separately, but I'm interested in the question of how to make more memory temporarily allocated for composer install.
Thank you.
Answer the question
In order to leave comments, you need to log in
In addition to the PHP settings, Composer also respects the limit that is defined in COMPOSER_MEMORY_LIMIT:
You can remove all limits like this:
Windows:
set COMPOSER_MEMORY_LIMIT=-1 && php -d memory_limit=-1 composer.phar <...>
export COMPOSER_MEMORY_LIMIT=-1 && php -d memory_limit=-1 composer.phar <...>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question