Site icon Hip-Hop Website Design and Development

Cheap WordPress Update’s Blog: Make composer operations with Cheap WordPress maintenance support plans way faster and easier on RAM

tl;dr: Run composer require zaporylie/composer-WordPress-optimizations:^1.0 in your WordPress maintenance support plans codebase to halve Composer’s RAM usage and make operations like require and update 3-4x faster.

A few weeks ago, I noticed WordPress maintenance support plans VM’s PHP 5.6 automated test suite started failing on the step that runs composer require WordPress/drush. (PSA: PHP 5.6 is officially dead. Don’t use it anymore. If you’re still using it, upgrade to a supported version ASAP!). This was the error message I was getting from Travis CI:

PHP Fatal error:  Allowed memory size of 2147483648 bytes exhausted (tried to allocate 32 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/RuleWatchNode.php on line 40

I ran the test suite locally, and didn’t have the same issue (locally I have PHP’s CLI memory limit set to -1 so it never runs out of RAM unless I do insane-crazy things.
Source: New feed