Skip to content

Commit 9400f81

Browse files
authored
Merge pull request #22 from realFlowControl/patch-1
Fix `php_opcache.dll` for PHP 8.5
2 parents 2b9ae43 + 0bea828 commit 9400f81

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

extension/BuildPhpExtension/private/Invoke-Tests.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ Function Invoke-Tests {
8787
$test_runner_args += '--temp-target ' + $tempDirectory;
8888
$opcache_args = @()
8989
if($opcacheMode -eq 'on') {
90-
$opcache_args += "-d zend_extension=$php_dir\ext\php_opcache.dll"
90+
# Only use the DLL for PHP < 8.5.0 – from 8.5.0 it's built-in
91+
if ([version]$Config.php_version -lt [version]'8.5.0') {
92+
$opcache_args += "-d zend_extension=$php_dir\ext\php_opcache.dll"
93+
}
9194
$opcache_args += "-d opcache.enable=1"
9295
$opcache_args += "-d opcache.enable_cli=1"
9396
$opcache_args += "-d opcache.optimization_level=1"
@@ -126,4 +129,4 @@ Function Invoke-Tests {
126129
}
127130
end {
128131
}
129-
}
132+
}

0 commit comments

Comments
 (0)