Skip to content

Commit

Permalink
Let disable-extension also disable zend extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jan 17, 2024
1 parent d2c3f89 commit aa40383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Psalm/Internal/Cli/Psalm.php
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,10 @@ private static function restart(array $options, int $threads, Progress $progress
'blackfire',
]);

if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
$ini_handler->disableExtensions(['opcache', 'Zend OPcache']);
}

// If Xdebug is enabled, restart without it
$ini_handler->check();

Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Fork/PsalmRestarter.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private static function toBytes(string $value): int
protected function restart($command): void
{
if ($this->required && $this->tmpIni) {
$regex = '/^\s*(extension\s*=.*(' . implode('|', $this->disabled_extensions) . ').*)$/mi';
$regex = '/^\s*((?:zend_)?extension\s*=.*(' . implode('|', $this->disabled_extensions) . ').*)$/mi';
$content = file_get_contents($this->tmpIni);
assert($content !== false);

Expand Down

0 comments on commit aa40383

Please sign in to comment.