https://github.com/composer/composer/commit/ac676f47f7bbc619678a29deae097b6b0710b799
Won't a simple composer self-update work? That was added 5 days ago...
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
http://www.reddit.com/r/programming/comments/2o1nuk/one_php_line_changed_and_composer_run_70_faster/
As per the recent revelations of PHP's GC being detrimental to Composer.
This should be applicable to Mac / Linux where composer is installed machine wide (/usr/bin).
sudo mv /usr/bin/composer /usr/bin/composer_slow
sudo vi /usr/bin/composer
Add the following into the VI editor (or use whatever you prefer.
#!/bin/sh
php -d zend.enable_gc=0 /usr/bin/composer_slow "$@" --profile
Save this file, then
chmod +x /usr/bin/composer
I always like to see how much my composer is using so I do --profile always.
Your results may vary! Only attempt if you understand what's written above! I haven't tried to see what happens with a composer self-update yet, but who knows. So far I've cut my composer update time in half.
This should be considered a temporary solution since now this is known, composer peoples will most likely be looking at a more permanent solution.
https://github.com/composer/composer/commit/ac676f47f7bbc619678a29deae097b6b0710b799
Won't a simple composer self-update work? That was added 5 days ago...
Please or to participate in this conversation.