With every PHP update MAMP Pro adds an updated `php.ini file, so previous adaptations are lost after upgrading.
Interestingly, editing a specific PHP versions config file (via
File > Edit Template > PHP -> [Version]) doesn’t have any effect on MAMP’s PHP used on the command line. To increase the PHP limit to be able to work with Composer I did the following:
- Find the current
memory_limitvalue by running:
php -r "echo ini_get('memory_limit').PHP_EOL;“
- Find out which php-ini is currently loaded on the command line by running:
php -r 'phpinfo();' | grep 'php.ini'
- Update that config file
Rinse and repeat with every MAMP update.