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

Merge pull request #10614 from weirdan/fix-json-mapping-with-opcache.save_comments-0

This commit is contained in:
Bruce Weirdan 2024-01-30 00:06:11 -04:00 committed by GitHub
commit e02276a17f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -84,6 +84,11 @@ final class PsalmRestarter extends XdebugHandler
}
}
// opcache.save_comments is required for json mapper (used in language server) to work
if ($opcache_loaded && in_array(ini_get('opcache.save_comments'), ['0', 'false', 0, false])) {
return true;
}
return $default || $this->required;
}
@ -152,6 +157,10 @@ final class PsalmRestarter extends XdebugHandler
];
}
if ($opcache_loaded) {
$additional_options[] = '-dopcache.save_comments=1';
}
array_splice(
$command,
1,