From fc793d8c0ff61e0837a1f6e311b620fb0f075a3e Mon Sep 17 00:00:00 2001 From: NoiseByNorthwest Date: Sun, 29 Sep 2024 12:45:18 +0200 Subject: [PATCH 1/3] Add PHP8.4 support --- .github/workflows/main.yml | 2 +- README.md | 4 ++-- src/php_spx.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 190078b..d846891 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] + php: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] name: - linux diff --git a/README.md b/README.md index c0403bc..6e00582 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Current requirements are: * x86-64 or ARM64 * **GNU/Linux**, **macOS** or **FreeBSD** * zlib dev package (e.g. zlib1g-dev on Debian based distros) -* PHP 5.4 to 8.3 +* PHP 5.4 to 8.4 ## Installation @@ -503,7 +503,7 @@ See the [LICENSE][:link-license:] file for more information. [:badge-ci:]: https://github.com/NoiseByNorthwest/php-spx/actions/workflows/main.yml/badge.svg [:link-ci:]: https://github.com/NoiseByNorthwest/php-spx/actions/workflows/main.yml -[:badge-php-versions:]: https://img.shields.io/badge/php-5.4--8.3-blue.svg +[:badge-php-versions:]: https://img.shields.io/badge/php-5.4--8.4-blue.svg [:badge-supported-platforms:]: https://img.shields.io/badge/platform-GNU/Linux%20|%20macOS%20|%20FreeBSD%20-yellow [:badge-supported-arch:]: https://img.shields.io/badge/architecture-x86--64%20|%20ARM64%20-silver diff --git a/src/php_spx.h b/src/php_spx.h index 1ab17e1..006e92d 100644 --- a/src/php_spx.h +++ b/src/php_spx.h @@ -31,8 +31,8 @@ # error "Only x86-64 and ARM64 architectures are supported" #endif -#if ZEND_MODULE_API_NO < 20100525 || ZEND_MODULE_API_NO > 20230831 // 8.3-RC5 -# error "Only the following PHP versions are supported: 5.4 to 8.3" +#if ZEND_MODULE_API_NO < 20100525 || ZEND_MODULE_API_NO > 20240924 +# error "Only the following PHP versions are supported: 5.4 to 8.4" #endif #define PHP_SPX_EXTNAME "SPX" From 4bc381ed431f7a8d77f0c940b818592f62b2f619 Mon Sep 17 00:00:00 2001 From: NoiseByNorthwest Date: Sun, 29 Sep 2024 14:36:18 +0200 Subject: [PATCH 2/3] CI: update macos version --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d846891..3b1e272 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,7 @@ jobs: # Debian (docker) - { name: debian, ts: 'nts', compiler: 'gcc', os: ubuntu-20.04 } # macOS - - { name: mac, ts: 'nts', compiler: 'clang', os: macos-12 } + - { name: mac, ts: 'nts', compiler: 'clang', os: macos-13 } steps: - uses: actions/checkout@v3 From fab08fe1acccee07224dadb8987bb5a3ec35b0a7 Mon Sep 17 00:00:00 2001 From: NoiseByNorthwest Date: Sun, 29 Sep 2024 23:52:53 +0200 Subject: [PATCH 3/3] Fix PHP8.4 build on macOS --- config.m4 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config.m4 b/config.m4 index 6b0898a..e6fc9a1 100644 --- a/config.m4 +++ b/config.m4 @@ -14,6 +14,12 @@ if test "$PHP_SPX" = "yes"; then CFLAGS="-Werror -Wall -O3 -pthread -std=gnu90" + if test "$(uname -s 2>/dev/null)" = "Darwin" + then + # see discussion here https://github.com/NoiseByNorthwest/php-spx/pull/270 + CFLAGS="$CFLAGS -Wno-typedef-redefinition" + fi + if test "$PHP_SPX_DEV" = "yes" then CFLAGS="$CFLAGS -g"