Skip to content

Commit 877e4f8

Browse files
authored
Merge pull request #68 from mlocati/extensions-beta-in-release-urls
Also look for beta extensions in release URLs
2 parents 8c9024a + b3ff107 commit 877e4f8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

PhpManager/private/Get-PeclArchiveUrl.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
$rxMatch += '-' + [regex]::Escape($PhpVersion.Architecture)
6161
$rxMatch += '\.zip$'
6262
$urls = @()
63-
if ($MaximumStability -eq $Script:PEARSTATE_STABLE) {
63+
if ($MaximumStability -eq $Script:PEARSTATE_STABLE -or $MaximumStability -eq $Script:PEARSTATE_BETA) {
6464
$urls += "https://windows.php.net/downloads/pecl/releases/$handleLC/$PackageVersion"
6565
}
6666
if ($MinimumStability -ne $Script:PEARSTATE_STABLE) {

test/tests/Install-Enable-Extensions.Tests.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@
5858
$imagick.Type | Should -BeExactly 'Php'
5959
$imagick.State | Should -BeExactly 'Disabled'
6060
}
61+
It -Name 'should download and install msgpack-beta on PHP <version>' -TestCases $testCases {
62+
param ($path, $version)
63+
if ($version -ne '7.2') {
64+
Set-ItResult -Skipped -Because "Not supported on PHP $version"
65+
}
66+
$msgpack = Get-PhpExtension -Path $path | Where-Object { $_.Handle -eq 'msgpack' }
67+
$msgpack | Should -HaveCount 0
68+
Install-PhpExtension -Extension msgpack -Path $path -MinimumStability beta -MaximumStability beta
69+
$msgpack = Get-PhpExtension -Path $path | Where-Object { $_.Handle -eq 'msgpack' }
70+
$msgpack | Should -HaveCount 1
71+
}
6172
It -Name 'should download and install yaml on PHP <version>' -TestCases $testCases {
6273
param ($path, $version)
6374
Get-PhpExtension -Path $path | Where-Object { $_.Handle -eq 'yaml' } | Should -HaveCount 0

0 commit comments

Comments
 (0)