Skip to content

Commit

Permalink
Fix parsing of PHP 7.4 beta URL
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati committed Sep 3, 2019
1 parent 28bc4c5 commit cbda459
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PhpManager/private/Constants.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ New-Variable -Option Constant -Scope Script -Name 'UNSTABLEPHP_RELEASECANDIDATE'
# PHP non-stable identifiers regex
New-Variable -Option Constant -Scope Script -Name 'UNSTABLEPHP_RX' -Value "$UNSTABLEPHP_ALPHA|$UNSTABLEPHP_BETA|$UNSTABLEPHP_RELEASECANDIDATE"

New-Variable -Option Constant -Scope Script -Name 'RX_ZIPARCHIVE' -Value "php-(\d+\.\d+\.\d+)(?:($UNSTABLEPHP_RX)([1-9]\d*))?(-nts)?-Win32-(?:VC|vs)(\d{1,2})-(x86|x64)\.zip"
New-Variable -Option Constant -Scope Script -Name 'RX_ZIPARCHIVE' -Value "php-(\d+\.\d+\.\d+)(?:($UNSTABLEPHP_RX)([1-9]\d*))?(-nts)?-Win32-(?:VC|vc|vs)(\d{1,2})-(x86|x64)\.zip"

New-Variable -Option Constant -Scope Script -Name 'EXTENSIONSTATE_BUILTIN' -Value 'Builtin'
New-Variable -Option Constant -Scope Script -Name 'EXTENSIONSTATE_UNKNOWN' -Value 'Unknown'
Expand Down
2 changes: 1 addition & 1 deletion PhpManager/private/Get-PeclArchiveUrl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
$rxMatch += '-' + [regex]::Escape($PackageVersion)
$rxMatch += '-' + [regex]::Escape('' + $PhpVersion.ComparableVersion.Major + '.' + $PhpVersion.ComparableVersion.Minor)
$rxMatch += '-' + $(if ($PhpVersion.ThreadSafe) { 'ts' } else { 'nts' } )
$rxMatch += '-(vc|vs)' + $PhpVersion.VCVersion
$rxMatch += '-(VC|vc|vs)' + $PhpVersion.VCVersion
$rxMatch += '-' + [regex]::Escape($PhpVersion.Architecture)
$rxMatch += '\.zip$'
$urls = @("https://windows.php.net/downloads/pecl/releases/$handleLC/$PackageVersion")
Expand Down
2 changes: 1 addition & 1 deletion PhpManager/private/Install-PhpExtensionPrerequisite.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Write-Verbose ('Checking prerequisites for {0}' -f $Extension.Name)
switch ($Extension.Handle) {
imagick {
$rxSearch = '/ImageMagick-[\d\.\-]+-(vc|vs)' + $PhpVersion.VCVersion + '-' + $PhpVersion.Architecture + '\.zip$'
$rxSearch = '/ImageMagick-[\d\.\-]+-(VC|vc|vs)' + $PhpVersion.VCVersion + '-' + $PhpVersion.Architecture + '\.zip$'
$pageUrl = 'https://windows.php.net/downloads/pecl/deps/'
Set-NetSecurityProtocolType
$webResponse = Invoke-WebRequest -UseBasicParsing -Uri $pageUrl
Expand Down

0 comments on commit cbda459

Please sign in to comment.