Composer: PHP Fatal error: Allowed memory size exhausted

This error can occur especially when you are updating large libraries or libraries with a lot of dependencies. Composer can be quite memory hungry.

Be sure that your composer itself is updated to the latest version:

php composer.phar --self-update

You can increase the memory limit for the composer process temporarily by adding the “-d” option for setting an php.ini value:

php -d memory_limit=512M composer.phar update ...

Use the format “128M” for megabyte or “2G” for gigabyte. You can use the value “-1” to ignore the memory limit completely.

For further informations, visit the composer troubleshooting page.