From 5df21fe448589609b6c91ac77fe5d07b61cd1b61 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 19 Feb 2023 16:57:23 +0100 Subject: [PATCH] Always use 0x7FFEBFFF opcache optimization level (fixes #9340) --- src/Psalm/Internal/Fork/PsalmRestarter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Psalm/Internal/Fork/PsalmRestarter.php b/src/Psalm/Internal/Fork/PsalmRestarter.php index f02a33614a7..a784b7b7097 100644 --- a/src/Psalm/Internal/Fork/PsalmRestarter.php +++ b/src/Psalm/Internal/Fork/PsalmRestarter.php @@ -66,6 +66,10 @@ protected function requiresRestart($default): bool if (((int) ini_get('opcache.jit')) === 0) { return true; } + + if (ini_get('opcache.optimization_level') !== '0x7FFEBFFF') { + return true; + } } return $default || $this->required; @@ -98,6 +102,7 @@ protected function restart(array $command): void '-dopcache.enable_cli=true', '-dopcache.jit_buffer_size=512M', '-dopcache.jit=1205', + '-dopcache.optimization_level=0x7FFEBFFF', ]; }