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:
commit
e02276a17f
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user