I attempted to install aws/aws-sdk-php
yesterday on one of my Laravel 4 projects using Composer, I cannot remember exactly the chain of events but it did not in
If you're having 8 GB of Ram or more, then you can surely increase the PHP memory_limit to 1 GB or else to 512MB. On your Mac open terminal-
php --ini
php-memory-limits.ini
file.nano /usr/local/etc/php/7.4/conf.d/php-memory-limits.ini
memory_limit = 1G
php -r "echo ini_get('memory_limit').PHP_EOL;"
brew services restart php
And done. Increasing the memory limit also reduces a little bit of composer update
completion time, which is good.
If you wanna speed up composer update
time. Try installing the popular - Prestissimo package.
Easy, type this commands:
rm -rf vendor/
rm -rf composer.lock
php composer install --prefer-dist
Should work for low memory machines or others memory problems
I ran into this too but I use brew
.
composer --version
brew info composer
brew upgrade composer
...
==> Upgrading 1 outdated package:
composer 1.9.0 -> 1.9.2
==> Upgrading composer
...
which still did not fix my composer require drupal/environment_indicator
Using the php memory limit mentioned by others fixed this finally.
php -d memory_limit=-1 `which composer` require drupal/environment_indicator