@@ -2,6 +2,8 @@ Function Get-LibrariesFromConfig {
22 <#
33 . SYNOPSIS
44 Get the Libraries from the config.w32 file
5+ . PARAMETER PhpVersion
6+ PhpVersion
57 . PARAMETER Extension
68 Extension
79 . PARAMETER VsVersion
@@ -13,13 +15,15 @@ Function Get-LibrariesFromConfig {
1315 #>
1416 [OutputType ()]
1517 param (
16- [Parameter (Mandatory = $true , Position = 0 , HelpMessage = ' Extension' )]
18+ [Parameter (Mandatory = $true , Position = 0 , HelpMessage = ' PHP Version' )]
19+ [string ] $PhpVersion ,
20+ [Parameter (Mandatory = $true , Position = 1 , HelpMessage = ' Extension' )]
1721 [string ] $Extension ,
18- [Parameter (Mandatory = $true , Position = 1 , HelpMessage = ' Visual Studio Version' )]
22+ [Parameter (Mandatory = $true , Position = 2 , HelpMessage = ' Visual Studio Version' )]
1923 [string ] $VsVersion ,
20- [Parameter (Mandatory = $true , Position = 2 , HelpMessage = ' Architecture' )]
24+ [Parameter (Mandatory = $true , Position = 3 , HelpMessage = ' Architecture' )]
2125 [string ] $Arch ,
22- [Parameter (Mandatory = $true , Position = 3 , HelpMessage = ' config.w32 content' )]
26+ [Parameter (Mandatory = $true , Position = 4 , HelpMessage = ' config.w32 content' )]
2327 [string ] $ConfigW32Content
2428 )
2529 begin {
@@ -109,6 +113,13 @@ Function Get-LibrariesFromConfig {
109113 $foundItems = $foundItems | Where-Object {$_ -notmatch " libsasl.*" }
110114 }
111115
116+ # For PHP Version 8.0 and 8.1, replace librabbitmq.openssl3 with librabbitmq.openssl1.1
117+ if ($PhpVersion -match ' ^8\.[01]' ) {
118+ $foundItems = $foundItems | ForEach-Object {
119+ if ($_ -match ' librabbitmq\.openssl3' ) { $_ -replace ' librabbitmq\.openssl3' , ' librabbitmq.openssl1.1' } else { $_ }
120+ }
121+ }
122+
112123 # Custom mappings which are not in config.w32
113124 if ($Extension -eq " memcached" -or $Extension -eq " xlswriter" ) {
114125 $foundItems += " zlib"
0 commit comments