setup-php 2.30.2 → 2.30.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -100,7 +100,8 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t
|
|
|
100
100
|
|
|
101
101
|
On all supported OS/Platforms the following PHP versions can be set up as per the runner.
|
|
102
102
|
|
|
103
|
-
- PHP 5.3 to PHP 8.4 on GitHub-hosted runners.
|
|
103
|
+
- PHP 5.3 to PHP 8.4 on GitHub-hosted runners, except for macOS ARM64 runners (macos-14).
|
|
104
|
+
- PHP 5.6 to PHP 8.4 on GitHub-hosted macOS ARM64 runners (macos-14).
|
|
104
105
|
- PHP 5.6 to PHP 8.4 on self-hosted runners.
|
|
105
106
|
|
|
106
107
|
| PHP Version | Stability | Release Support | Runner Support |
|
package/package.json
CHANGED
package/src/scripts/darwin.sh
CHANGED
|
@@ -168,6 +168,7 @@ add_php() {
|
|
|
168
168
|
else
|
|
169
169
|
brew install -f "$php_formula"
|
|
170
170
|
fi
|
|
171
|
+
sudo chown -R "$(id -un)":"$(id -gn)" "$brew_prefix"
|
|
171
172
|
brew link --force --overwrite "$php_formula"
|
|
172
173
|
}
|
|
173
174
|
|
|
@@ -227,7 +228,7 @@ setup_php() {
|
|
|
227
228
|
status="Updated to"
|
|
228
229
|
fi
|
|
229
230
|
php_config="$(command -v php-config)"
|
|
230
|
-
ext_dir="$(
|
|
231
|
+
ext_dir="$(sed -n "s/.*extension_dir=['\"]\(.*\)['\"].*/\1/p" "$php_config")"
|
|
231
232
|
ini_dir="$(php_ini_path)"
|
|
232
233
|
scan_dir="$(get_scan_dir)"
|
|
233
234
|
ini_file="$ini_dir"/php.ini
|
|
@@ -66,7 +66,7 @@ Function Enable-Extension() {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
# Function to add custom built PHP extension for nightly builds.
|
|
69
|
-
Function Add-
|
|
69
|
+
Function Add-ExtensionFromGithub {
|
|
70
70
|
Param (
|
|
71
71
|
[Parameter(Position = 0, Mandatory = $true)]
|
|
72
72
|
[ValidateNotNull()]
|
|
@@ -123,7 +123,7 @@ Function Add-Extension {
|
|
|
123
123
|
}
|
|
124
124
|
else {
|
|
125
125
|
if(($version -match $nightly_versions) -and (Select-String -Path $src\configs\windows_extensions -Pattern $extension -SimpleMatch -Quiet)) {
|
|
126
|
-
Add-
|
|
126
|
+
Add-ExtensionFromGithub $extension
|
|
127
127
|
} else {
|
|
128
128
|
# Patch till DLLs for PHP 8.1 and above are released as stable.
|
|
129
129
|
$minimumStability = $stability
|
|
@@ -29,7 +29,7 @@ Function Get-SqlsrvReleaseUrl()
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
# Function to add sqlsrv extension from GitHub.
|
|
32
|
-
Function Add-
|
|
32
|
+
Function Add-SqlsrvFromMSGithub()
|
|
33
33
|
{
|
|
34
34
|
Param (
|
|
35
35
|
[Parameter(Position = 0, Mandatory = $true)]
|
|
@@ -37,16 +37,18 @@ Function Add-SqlsrvFromGithub()
|
|
|
37
37
|
[string]
|
|
38
38
|
$extension
|
|
39
39
|
)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
try {
|
|
41
|
+
$zipUrl = SqlsrvReleaseUrl
|
|
42
|
+
if($zipUrl) {
|
|
43
|
+
$nts = if (!$installed.ThreadSafe) { "nts" } else { "ts" }
|
|
44
|
+
$noDotVersion = $version.replace('.', '')
|
|
45
|
+
$extensionFilePath = "Windows-$version\$arch\php_${extension}_${noDotVersion}_${nts}.dll"
|
|
46
|
+
Get-File -Url $zipUrl -OutFile $ENV:RUNNER_TOOL_CACHE\sqlsrv.zip > $null 2>&1
|
|
47
|
+
Expand-Archive -Path $ENV:RUNNER_TOOL_CACHE\sqlsrv.zip -DestinationPath $ENV:RUNNER_TOOL_CACHE\sqlsrv -Force > $null 2>&1
|
|
48
|
+
Copy-Item -Path "$ENV:RUNNER_TOOL_CACHE\sqlsrv\$extensionFilePath" -Destination "$ext_dir\php_$extension.dll"
|
|
49
|
+
Enable-PhpExtension -Extension $extension -Path $php_dir
|
|
50
|
+
}
|
|
51
|
+
} catch { }
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
# Function to add sqlsrv extension.
|
|
@@ -61,7 +63,12 @@ Function Add-Sqlsrv() {
|
|
|
61
63
|
if (Test-Path $ext_dir\php_$extension.dll) {
|
|
62
64
|
Enable-PhpExtension -Extension $extension -Path $php_dir
|
|
63
65
|
} else {
|
|
64
|
-
|
|
66
|
+
try {
|
|
67
|
+
Add-ExtensionFromGithub $extension > $null 2>&1
|
|
68
|
+
} catch {}
|
|
69
|
+
if (-not(Test-Extension $extension)) {
|
|
70
|
+
Add-SqlsrvFromMSGithub $extension >$null 2>&1
|
|
71
|
+
}
|
|
65
72
|
if (-not(Test-Extension $extension)) {
|
|
66
73
|
Add-Extension $extension >$null 2>&1
|
|
67
74
|
}
|