Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable opcache if it is installed #9779

Merged
merged 2 commits into from
May 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/Psalm/Internal/Cli/Psalm.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
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;
Expand Down Expand Up @@ -923,11 +922,7 @@ private static function restart(array $options, int $threads, Progress $progress
// 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);
Expand Down