Skip to content

Commit 8d5cbe2

Browse files
committed
Add PHP 8.6 [skip ci]
Fix building oauth and swoole
1 parent c8d65be commit 8d5cbe2

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/cache-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
inputs:
88
php-versions:
99
description: 'PHP version to build'
10-
default: '8.5'
10+
default: '8.5 8.6'
1111
required: false
1212
builds:
1313
description: 'Build type'
@@ -23,7 +23,7 @@ on:
2323
required: false
2424

2525
env:
26-
PHP_VERSIONS: '8.5'
26+
PHP_VERSIONS: '8.5 8.6'
2727
BUILDS: 'debug release'
2828
TS: 'nts zts'
2929
CONTAINERS: 'ubuntu:24.04 ubuntu:22.04 arm64v8/ubuntu:22.04 arm64v8/ubuntu:24.04'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<a href="https://github.com/shivammathur/php-ubuntu" title="PHP Package Cache"><img alt="Build status" src="https://github.com/shivammathur/php-ubuntu/workflows/Cache%20PHP%20for%20stable%20versions/badge.svg"></a>
44
<a href="https://github.com/shivammathur/php-ubuntu/blob/main/LICENSE" title="license"><img alt="LICENSE" src="https://img.shields.io/badge/license-MIT-428f7e.svg?logo=open%20source%20initiative&logoColor=white&labelColor=555555"></a>
5-
<a href="https://github.com/shivammathur/php-ubuntu/tree/main/builds" title="builds"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.6%20to%208.5-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
5+
<a href="https://github.com/shivammathur/php-ubuntu/tree/main/builds" title="builds"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.6%20to%208.6-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
66
<a href="https://cloudsmith.io/~shivammathur/repos/php-ubuntu" title="mirror"><img alt="cloudsmith mirror" src="https://img.shields.io/badge/builds-cloudsmith-blue?logo=cloudsmith"></a>
77

88
> Cache PHP packages for installing on GitHub Actions

scripts/extensions.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ add_swoole() {
4141
yes '' 2>/dev/null | sudo pecl install -f -D 'enable-openssl="yes" enable-sockets="yes" enable-swoole-curl="yes"' swoole-5.1.6 && configure_extension swoole
4242
elif [[ "$PHP_VERSION" =~ 8.[1-4] ]]; then
4343
yes '' 2>/dev/null | sudo pecl install -f -D 'enable-openssl="yes" enable-sockets="yes" enable-swoole-curl="yes"' swoole && configure_extension swoole
44-
elif [[ "$PHP_VERSION" = "8.5" ]]; then
44+
elif [[ "$PHP_VERSION" =~ 8.[5-6] ]]; then
4545
git clone https://github.com/swoole/swoole-src
4646
(
4747
cd swoole-src
48+
curl -o swoole.patch -sL https://patch-diff.githubusercontent.com/raw/swoole/swoole-src/pull/5823.patch
49+
git apply swoole.patch
4850
phpize
4951
./configure --enable-openssl=yes --enable-sockets=yes --enable-swoole-curl="yes"
5052
make -j$(nproc)
@@ -79,7 +81,10 @@ add_oauth() {
7981
sudo tar xf oauth-*
8082
(
8183
cd oauth-*/
82-
[[ "$PHP_VERSION" =~ 8.5 ]] && for file in provider.c oauth.c; do sed -i 's/zend_exception_get_default()/zend_ce_exception/' $file; done
84+
if [[ "$PHP_VERSION" =~ 8.[5-6] ]]; then
85+
for file in provider.c oauth.c; do sed -i 's/zend_exception_get_default()/zend_ce_exception/' $file; done
86+
sed -i 's#ext/standard/php_smart_string.h#Zend/zend_smart_string.h#' php_oauth.h
87+
fi
8388
build_oauth
8489
)
8590
fi

0 commit comments

Comments
 (0)