Composer error when setting up .../v2/php_payment "no more memory"

Error encountered following the instructions in “…/connect-examples/v2/php_payment/” when running “composer install”.

I see the “no more memory” message but I don’t think that’s really the issue. I’ve run composer successfully before. What’s it trying to tell me?

I also see a reference to “/usr/local/bin/composer/vendor/…” in the error message. On my system /usr/local/bin/composer is the composer php file, not a directory. Is there a problem here? Looking at the composer file was not enlightening.

I reinstalled composer–same result. I tried as root–same result. I re-extracted the source code from the zip file I downloaded from connect-api-examples/connect-examples/v2/php_payment at master · square/connect-api-examples · GitHub – same result.

What to try next?

MacOS 10.12.6, 16 GB RAM

$ composer install

PHP Fatal error: Uncaught ErrorException: preg_match_all(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php:152

Stack trace:

#0 [internal function]: Composer\Util\ErrorHandler::handle(2, ‘preg_match_all(…’, ‘phar:///usr/loc…’, 152, Array)

#1 phar:///usr/local/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php(152): preg_match_all(’#<(([a-z](?:[^\…’, ‘’, Array, 256)

#2 phar:///usr/local/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php(135): Symfony\Component\Console\Formatter\OutputFormatter->formatAndWrap(’’, 0)

#3 phar:///usr/local/bin/composer/vendor/symfony/console/Output/Output.php(157): Symfony\Component\Console\Formatter\OutputFormatter->format(’’)

#4 phar:///usr/local/bin/composer/vendor/symfony/console/Output/Output.php(132): Symfony\Component\Console\Output\Output->write(Array, true, 16)

#5 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(827): Symfony\Component\Console\Output\Outp in phar:///usr/local/bin/composer/vendor/symfony/console/Formatter/OutputFormatter.php on line 152

:wave: As this isn’t a Square error I’m not sure how to fix this but this post may help resolve the issue. :slightly_smiling_face:

You are correct, I was just stuck.

I see now that this problem is all because my development system is stuck in the past. I don’t want to upgrade my MacOS because of some other software packages. This has me stuck on php 7.3. That is why composer didn’t work. “brew” refuses to update php because of my MacOS version. And so on…

Thanks for your link.