There was an error came out after I upgraded PHP version to 7.3. When I execute composer --version
or composer update
, a lot of error messages shown:
PHP Warning: preg_match(): JIT compilation failed: no more memory in
phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php on line 755
:
:
The composer was broken!
This is a known PHP 7.3 bug.
After searching the solution, somebody suggests a work around below:
-
Edit
php.ini
file (locate at /usr/local/etc/php/7.3/php.ini). -
Disable PHP PCRE JIT compilation:
[Pcre] ;pcre.jit=1 pcre.jit=0
Then the composer is alive again! It’s great!
Remember to change back to the original setting while the bug fix.
No comments:
Post a Comment