Skip to content

Commit

Permalink
Merge pull request #68 from mlocati/extensions-beta-in-release-urls
Browse files Browse the repository at this point in the history
Also look for beta extensions in release URLs
  • Loading branch information
mlocati authored Oct 29, 2020
2 parents 8c9024a + b3ff107 commit 877e4f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PhpManager/private/Get-PeclArchiveUrl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
$rxMatch += '-' + [regex]::Escape($PhpVersion.Architecture)
$rxMatch += '\.zip$'
$urls = @()
if ($MaximumStability -eq $Script:PEARSTATE_STABLE) {
if ($MaximumStability -eq $Script:PEARSTATE_STABLE -or $MaximumStability -eq $Script:PEARSTATE_BETA) {
$urls += "https://windows.php.net/downloads/pecl/releases/$handleLC/$PackageVersion"
}
if ($MinimumStability -ne $Script:PEARSTATE_STABLE) {
Expand Down
11 changes: 11 additions & 0 deletions test/tests/Install-Enable-Extensions.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@
$imagick.Type | Should -BeExactly 'Php'
$imagick.State | Should -BeExactly 'Disabled'
}
It -Name 'should download and install msgpack-beta on PHP <version>' -TestCases $testCases {
param ($path, $version)
if ($version -ne '7.2') {
Set-ItResult -Skipped -Because "Not supported on PHP $version"
}
$msgpack = Get-PhpExtension -Path $path | Where-Object { $_.Handle -eq 'msgpack' }
$msgpack | Should -HaveCount 0
Install-PhpExtension -Extension msgpack -Path $path -MinimumStability beta -MaximumStability beta
$msgpack = Get-PhpExtension -Path $path | Where-Object { $_.Handle -eq 'msgpack' }
$msgpack | Should -HaveCount 1
}
It -Name 'should download and install yaml on PHP <version>' -TestCases $testCases {
param ($path, $version)
Get-PhpExtension -Path $path | Where-Object { $_.Handle -eq 'yaml' } | Should -HaveCount 0
Expand Down

0 comments on commit 877e4f8

Please sign in to comment.