Add patch to add PHP 8.1 extensions from snaps on Windows

This commit is contained in:
Shivam Mathur 2021-12-06 10:42:28 +05:30
parent cf36ddc55e
commit be75d5e01d
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -191,7 +191,13 @@ Function Add-Extension {
}
}
else {
$params = @{ Extension = $extension; MinimumStability = $stability; MaximumStability = $stability; Path = $php_dir; AdditionalFilesPath = $deps_dir; NoDependencies = $true }
# Patch till PHP 8.1 DLLs are released as stable.
$minimumStability = 'stable'
if($version -eq '8.1' -and $stability -eq 'stable') {
$minimumStability = 'snapshot'
}
$params = @{ Extension = $extension; MinimumStability = $minimumStability; MaximumStability = $stability; Path = $php_dir; AdditionalFilesPath = $deps_dir; NoDependencies = $true }
if($extension_version -ne '') {
$params["Version"] = $extension_version
}