setup-php 2.35.0 → 2.35.2
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/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
patch_geos() {
|
|
2
|
-
|
|
2
|
+
php_version_id="$(php -r "echo PHP_VERSION_ID;")"
|
|
3
|
+
if [ "$php_version_id" -ge 70000 ]; then
|
|
3
4
|
sed -i~ -e "s/, ce->name/, ZSTR_VAL(ce->name)/; s/ulong /zend_ulong /" geos.c
|
|
4
5
|
fi
|
|
6
|
+
if [ "$php_version_id" -ge 80500 ]; then
|
|
7
|
+
sed -i~ -e "s/zend_exception_get_default(TSRMLS_C)/zend_ce_exception/" geos.c
|
|
8
|
+
fi
|
|
5
9
|
get -q -n /tmp/php8.patch https://git.remirepo.net/cgit/rpms/php/php-geos.git/plain/0003-add-all-arginfo-and-fix-build-with-PHP-8.patch
|
|
6
10
|
get -q -n /tmp/toString.patch https://git.remirepo.net/cgit/rpms/php/php-geos.git/plain/0006-fix-__toString-with-8.2.patch
|
|
7
11
|
patch -p1 < /tmp/php8.patch 2>/dev/null || true
|
|
@@ -48,19 +48,6 @@ change_library_paths() {
|
|
|
48
48
|
fi
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
# Add hiredis library
|
|
52
|
-
add_hiredis() {
|
|
53
|
-
hiredis_url=https://github.com/redis/hiredis/archive/v1.1.0.tar.gz
|
|
54
|
-
hiredis_sha=fe6d21741ec7f3fc9df409d921f47dfc73a4d8ff64f4ac6f1d95f951bf7f53d6
|
|
55
|
-
sed -Ei.bak -e "s#^ url.*# url \"$hiredis_url\"#" -e "s#^ sha256.*# sha256 \"$hiredis_sha\"#" ${core_repo:?}/Formula/h/hiredis.rb
|
|
56
|
-
brew install -s hiredis
|
|
57
|
-
lib_dir="${brew_prefix:?}"/opt/hiredis/lib
|
|
58
|
-
if [ -e "$lib_dir"/libhiredis_ssl.1.1.0.dylib ]; then
|
|
59
|
-
sudo ln -sf "$lib_dir"/libhiredis_ssl.1.1.0.dylib "$lib_dir"/libhiredis_ssl.dylib.1.1.0
|
|
60
|
-
fi
|
|
61
|
-
mv ${core_repo:?}/Formula/h/hiredis.rb.bak ${core_repo:?}/Formula/h/hiredis.rb
|
|
62
|
-
}
|
|
63
|
-
|
|
64
51
|
# Add relay dependencies
|
|
65
52
|
add_relay_dependencies() {
|
|
66
53
|
add_extension json
|
|
@@ -69,8 +56,7 @@ add_relay_dependencies() {
|
|
|
69
56
|
if [ "$os" = "Darwin" ]; then
|
|
70
57
|
. "${0%/*}"/tools/brew.sh
|
|
71
58
|
configure_brew
|
|
72
|
-
brew install lz4 zstd concurrencykit
|
|
73
|
-
add_hiredis
|
|
59
|
+
brew install lz4 hiredis zstd concurrencykit
|
|
74
60
|
fi
|
|
75
61
|
}
|
|
76
62
|
|
|
@@ -28,6 +28,39 @@ Function Edit-ComposerConfig() {
|
|
|
28
28
|
Set-ComposerAuth
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
# Function to update auth.json.
|
|
32
|
+
Function Update-AuthJson {
|
|
33
|
+
[CmdletBinding()]
|
|
34
|
+
param(
|
|
35
|
+
[Parameter(Mandatory)][string[]] $ComposerAuth
|
|
36
|
+
)
|
|
37
|
+
if (Test-Path $composer_home\auth.json) {
|
|
38
|
+
try {
|
|
39
|
+
$existing = Get-Content $composer_home\auth.json -Raw | ConvertFrom-Json
|
|
40
|
+
} catch {
|
|
41
|
+
$existing = [PSCustomObject]@{}
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
$existing = [PSCustomObject]@{}
|
|
45
|
+
}
|
|
46
|
+
foreach ($fragment in $ComposerAuth) {
|
|
47
|
+
$piece = ('{' + $fragment + '}') | ConvertFrom-Json
|
|
48
|
+
foreach ($prop in $piece.PSObject.Properties) {
|
|
49
|
+
if ($prop.Name -eq 'http-basic') {
|
|
50
|
+
if (-not $existing.'http-basic') {
|
|
51
|
+
$existing | Add-Member -MemberType NoteProperty -Name 'http-basic' -Value ([PSCustomObject]@{}) -Force
|
|
52
|
+
}
|
|
53
|
+
foreach ($domainProp in $prop.Value.PSObject.Properties) {
|
|
54
|
+
$existing.'http-basic' | Add-Member -MemberType NoteProperty -Name $domainProp.Name -Value $domainProp.Value -Force
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
$existing | Add-Member -MemberType NoteProperty -Name $prop.Name -Value $prop.Value -Force
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
Set-Content -Path $composer_home\auth.json -Value ($existing | ConvertTo-Json -Depth 5)
|
|
62
|
+
}
|
|
63
|
+
|
|
31
64
|
# Function to setup authentication in composer.
|
|
32
65
|
Function Set-ComposerAuth() {
|
|
33
66
|
if(Test-Path env:COMPOSER_AUTH_JSON) {
|
|
@@ -48,7 +81,7 @@ Function Set-ComposerAuth() {
|
|
|
48
81
|
$composer_auth += '"github-oauth": {"github.com": "' + $env:GITHUB_TOKEN + '"}'
|
|
49
82
|
}
|
|
50
83
|
if($composer_auth.length) {
|
|
51
|
-
|
|
84
|
+
Update-AuthJson $composer_auth
|
|
52
85
|
}
|
|
53
86
|
}
|
|
54
87
|
|
|
@@ -11,7 +11,7 @@ get_tool_version() {
|
|
|
11
11
|
alp="[a-zA-Z0-9\.]"
|
|
12
12
|
version_regex="[0-9]+((\.{1}$alp+)+)(\.{0})(-$alp+){0,1}"
|
|
13
13
|
if [ "$tool" = "composer" ]; then
|
|
14
|
-
composer_alias_version="$(grep -Ea "const\sBRANCH_ALIAS_VERSION" "$tool_path_dir/composer" | grep -Eo "$version_regex")"
|
|
14
|
+
composer_alias_version="$(grep -Ea "const\sBRANCH_ALIAS_VERSION" "${tool_path_dir:?}/composer" | grep -Eo "$version_regex")"
|
|
15
15
|
if [[ -n "$composer_alias_version" ]]; then
|
|
16
16
|
composer_version="$composer_alias_version+$(grep -Ea "const\sVERSION" "$tool_path_dir/composer" | grep -Eo "$alp+" | tail -n 1)"
|
|
17
17
|
else
|
|
@@ -46,6 +46,25 @@ configure_composer() {
|
|
|
46
46
|
set_composer_auth
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
# Function to merge auth.json fragments.
|
|
50
|
+
update_auth_json() {
|
|
51
|
+
local auth_file="$composer_home/auth.json"
|
|
52
|
+
local merged
|
|
53
|
+
[[ -f "$auth_file" ]] && merged=$(<"$auth_file") || merged='{}'
|
|
54
|
+
for frag in "$@"; do
|
|
55
|
+
local obj="{$frag}"
|
|
56
|
+
merged=$(jq -n --argjson b "$merged" --argjson n "$obj" '
|
|
57
|
+
if $n|has("http-basic") then
|
|
58
|
+
(($b["http-basic"]//{}) + $n["http-basic"]) as $hb
|
|
59
|
+
| ($b + $n) | .["http-basic"] = $hb
|
|
60
|
+
else
|
|
61
|
+
$b + $n
|
|
62
|
+
end
|
|
63
|
+
')
|
|
64
|
+
done
|
|
65
|
+
printf '%s' "$merged" > "$composer_home/auth.json"
|
|
66
|
+
}
|
|
67
|
+
|
|
49
68
|
# Function to setup authentication in composer.
|
|
50
69
|
set_composer_auth() {
|
|
51
70
|
if [ -n "$COMPOSER_AUTH_JSON" ]; then
|
|
@@ -63,7 +82,7 @@ set_composer_auth() {
|
|
|
63
82
|
composer_auth+=( '"github-oauth": {"github.com": "'"${GITHUB_TOKEN:-$COMPOSER_TOKEN}"'"}' )
|
|
64
83
|
fi
|
|
65
84
|
if ((${#composer_auth[@]})); then
|
|
66
|
-
|
|
85
|
+
update_auth_json "${composer_auth[@]}"
|
|
67
86
|
fi
|
|
68
87
|
}
|
|
69
88
|
|