Skip to content

Commit

Permalink
Add workaround for pcre.jit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Nov 30, 2019
1 parent 0fa654e commit 952484c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Psalm/Internal/Fork/Pool.php
Expand Up @@ -116,6 +116,7 @@ public function __construct(
if (ini_get('pcre.jit') === '1' if (ini_get('pcre.jit') === '1'
&& \PHP_OS === 'Darwin' && \PHP_OS === 'Darwin'
&& version_compare(PHP_VERSION, '7.3.0') >= 0 && version_compare(PHP_VERSION, '7.3.0') >= 0
&& version_compare(PHP_VERSION, '7.4.0') < 0
) { ) {
die( die(
self::MAC_PCRE_MESSAGE . PHP_EOL self::MAC_PCRE_MESSAGE . PHP_EOL
Expand Down
1 change: 1 addition & 0 deletions src/psalm-language-server.php
Expand Up @@ -186,6 +186,7 @@ function ($arg) use ($valid_long_options, $valid_short_options) {
if (ini_get('pcre.jit') === '1' if (ini_get('pcre.jit') === '1'
&& PHP_OS === 'Darwin' && PHP_OS === 'Darwin'
&& version_compare(PHP_VERSION, '7.3.0') >= 0 && version_compare(PHP_VERSION, '7.3.0') >= 0
&& version_compare(PHP_VERSION, '7.4.0') < 0
) { ) {
die(\Psalm\Internal\Fork\Pool::MAC_PCRE_MESSAGE . PHP_EOL . PHP_EOL); die(\Psalm\Internal\Fork\Pool::MAC_PCRE_MESSAGE . PHP_EOL . PHP_EOL);
} }
Expand Down
1 change: 1 addition & 0 deletions src/psalm.php
Expand Up @@ -283,6 +283,7 @@ function ($arg) {
&& ini_get('pcre.jit') === '1' && ini_get('pcre.jit') === '1'
&& PHP_OS === 'Darwin' && PHP_OS === 'Darwin'
&& version_compare(PHP_VERSION, '7.3.0') >= 0 && version_compare(PHP_VERSION, '7.3.0') >= 0
&& version_compare(PHP_VERSION, '7.4.0') < 0
) { ) {
echo( echo(
'If you want to run Psalm as a language server, or run Psalm with' . PHP_EOL 'If you want to run Psalm as a language server, or run Psalm with' . PHP_EOL
Expand Down

0 comments on commit 952484c

Please sign in to comment.