1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Merge pull request #9779 from Nicelocal/enable_opcache_if_installed

Enable opcache if it is installed
This commit is contained in:
orklah 2023-05-11 19:38:14 +02:00 committed by GitHub
commit 5661ea615a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,6 @@ use function is_string;
use function json_encode;
use function max;
use function microtime;
use function opcache_get_status;
use function parse_url;
use function preg_match;
use function preg_replace;
@ -923,11 +922,7 @@ final class Psalm
// If Xdebug is enabled, restart without it
$ini_handler->check();
if (!function_exists('opcache_get_status')
|| !($opcache_status = opcache_get_status(false))
|| !isset($opcache_status['opcache_enabled'])
|| !$opcache_status['opcache_enabled']
) {
if (!function_exists('opcache_get_status')) {
$progress->write(PHP_EOL
. 'Install the opcache extension to make use of JIT on PHP 8.0+ for a 20%+ performance boost!'
. PHP_EOL . PHP_EOL);