When I run composer --version
in the macOS terminal, I get the following errors.
PHP Warning: preg_match(): JIT compilation failed: no more memory in
phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php
on line 755Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php
on line 755
PHP Warning: preg_match(): JIT compilation failed: no more memory in
phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php
on line 759Warning: preg_match(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php
on line 759
PHP Warning: preg_split(): JIT compilation failed: no more memory in
phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php
on line 654Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php
on line 654
PHP Warning: preg_split(): JIT compilation failed: no more memory in
phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php
on line 1091Warning: preg_split(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php
on line 1091
PHP Warning: preg_replace(): JIT compilation failed: no more memory in
phar:///usr/local/bin/composer.phar/vendor/symfony/console/Formatter/OutputFormatter.php
on line 36Warning: preg_replace(): JIT compilation failed: no more memory in phar:///usr/local/bin/composer.phar/vendor/symfony/console/Formatter/OutputFormatter.php
on line 36
[ErrorException] preg_match_all(): JIT compilation failed: no more memory
Best Answer
This is a known PHP 7.3 bug, which has already been fixed.
As a temporary workaround, edit your php.ini file (in my case:
vi /usr/local/etc/php/7.3/php.ini
), disable PHP PCRE JIT compilation by changing:to