From fc5d83f2b147d10d3f20aa96d9425b69d15b1b39 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 16 Oct 2024 22:46:20 +0200 Subject: [PATCH 1/8] Prepare for necessary move to macOS 13 GH will remove macOS 12 runner images as of December 3rd, so we prepare for that. Besides the obvious need to change the runner, we also suppress a couple of warnings, because otherwise the build would fail due to `-Werror`. --- .github/actions/configure-macos/action.yml | 2 +- .github/workflows/push.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/configure-macos/action.yml b/.github/actions/configure-macos/action.yml index 317d705645985..6d34b9318f3d0 100644 --- a/.github/actions/configure-macos/action.yml +++ b/.github/actions/configure-macos/action.yml @@ -19,7 +19,7 @@ runs: export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/zlib/lib/pkgconfig" export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c/lib/pkgconfig" ./buildconf --force - ./configure \ + CFLAGS='-Wno-strict-prototypes -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion' ./configure \ --enable-option-checking=fatal \ --prefix=/usr/local \ --enable-fpm \ diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0e0de633de286..8bce17224eb2c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -97,7 +97,7 @@ jobs: uses: ./.github/actions/verify-generated-files MACOS_DEBUG_NTS: if: github.repository == 'php/php-src' || github.event_name == 'pull_request' - runs-on: macos-12 + runs-on: macos-13 steps: - name: git checkout uses: actions/checkout@v4 From 251195b41bea35f356bdd2bfc3623da38dafa3e8 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Thu, 1 Feb 2024 02:03:55 +0700 Subject: [PATCH 2/8] ext/curl: Fix failing tests due to string changes in libcurl 8.6.0 Upstream libcurl 8.6.0 contains a change[^1] that caused a test failure. This fixes it by updating the test's `EXPECTF` to use a regex to account for both string patterns. [^1]: https://github.com/curl/curl/commit/45cf4755e71f#diff-a8a54563608f8155973318f4ddb61d7328dab512b8ff2b5cc48cc76979d4204cL1683 Closes GH-13293. --- ext/curl/tests/bug77946.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/curl/tests/bug77946.phpt b/ext/curl/tests/bug77946.phpt index 8b1e70675554f..7b836187d6bfb 100644 --- a/ext/curl/tests/bug77946.phpt +++ b/ext/curl/tests/bug77946.phpt @@ -34,4 +34,4 @@ curl_multi_close($mh); --EXPECTF-- int(1) int(1) -string(%d) "Protocol %Sunknown%S not supported or disabled in libcurl" +string(%d) "Protocol %Sunknown%S %rnot supported( or disabled in libcurl)?%r" From 4f2eb921b9b3f3f68ff84605afb77dbd00829a44 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 23 May 2024 22:20:37 +0200 Subject: [PATCH 3/8] Fix GH-14307: Test curl_basic_024 fails with curl 8.8.0 Curl changed the behaviour, from the changelog: - lib: make protocol handlers store scheme name lowercase curl/curl@c294f9c From the docs: "The returned scheme might be upper or lowercase. Do comparisons case insensitively." Closes GH-14312. --- ext/curl/tests/curl_basic_024.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/curl/tests/curl_basic_024.phpt b/ext/curl/tests/curl_basic_024.phpt index b16bfed03835f..84216bde308eb 100644 --- a/ext/curl/tests/curl_basic_024.phpt +++ b/ext/curl/tests/curl_basic_024.phpt @@ -25,7 +25,7 @@ var_dump(0 === curl_getinfo($ch, CURLINFO_PROXY_SSL_VERIFYRESULT)); var_dump(curl_getinfo($ch, CURLINFO_SCHEME)); curl_close($ch); ?> ---EXPECT-- +--EXPECTF-- bool(true) bool(true) -string(4) "HTTP" +string(4) "%r(HTTP|http)%r" From 714a3e707113510fb82bd507e9fd6f92954ca753 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 27 Jul 2024 16:09:50 +0200 Subject: [PATCH 4/8] Fix CI failure after Curl update (#15124) --- ext/standard/tests/file/bug52820.phpt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/standard/tests/file/bug52820.phpt b/ext/standard/tests/file/bug52820.phpt index ff816178cef67..c884f7edb91ff 100644 --- a/ext/standard/tests/file/bug52820.phpt +++ b/ext/standard/tests/file/bug52820.phpt @@ -46,21 +46,21 @@ echo "\nDone.\n"; temp stream \(close after\): About to rewind! (\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ -\* Closing connection( -?\d+)? +\* Closing connection( #?-?\d+)? memory stream \(close after\): About to rewind! (\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ -\* Closing connection( -?\d+)? +\* Closing connection( #?-?\d+)? temp stream \(leak\): About to rewind! (\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ -\* Closing connection( -?\d+)? +\* Closing connection( #?-?\d+)? memory stream \(leak\): About to rewind! (\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ -\* Closing connection( -?\d+)? +\* Closing connection( #?-?\d+)? Done\. From 5ce703496f4c9f0e95cc26af60f6abe62efde1d4 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 28 Jul 2024 14:34:26 +0200 Subject: [PATCH 5/8] Fix CI failure on macOS after Curl update --- ext/standard/tests/file/bug52820.phpt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/standard/tests/file/bug52820.phpt b/ext/standard/tests/file/bug52820.phpt index c884f7edb91ff..2d3cedad87944 100644 --- a/ext/standard/tests/file/bug52820.phpt +++ b/ext/standard/tests/file/bug52820.phpt @@ -46,21 +46,21 @@ echo "\nDone.\n"; temp stream \(close after\): About to rewind! (\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ -\* Closing connection( #?-?\d+)? +\* [Cc]losing connection( #?-?\d+)? memory stream \(close after\): About to rewind! (\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ -\* Closing connection( #?-?\d+)? +\* [Cc]losing connection( #?-?\d+)? temp stream \(leak\): About to rewind! (\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ -\* Closing connection( #?-?\d+)? +\* [Cc]losing connection( #?-?\d+)? memory stream \(leak\): About to rewind! (\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ -\* Closing connection( #?-?\d+)? +\* [Cc]losing connection( #?-?\d+)? Done\. From ec745178bbded22830046d2ba3458120b778c21f Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 23 Oct 2024 19:05:32 +0200 Subject: [PATCH 6/8] Backport parts of 9999a0c for gettext See 9999a0cb757344974889a6f548727de6f2c3c10d --- ext/gettext/tests/dcngettext.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/gettext/tests/dcngettext.phpt b/ext/gettext/tests/dcngettext.phpt index 715281ec8296b..2f356b1cf0c6a 100644 --- a/ext/gettext/tests/dcngettext.phpt +++ b/ext/gettext/tests/dcngettext.phpt @@ -11,10 +11,10 @@ if (!function_exists("dcngettext")) die("skip dcngettext() doesn't exist"); var_dump(dcngettext(1,1,1,1,1)); var_dump(dcngettext("test","test","test",1,1)); -var_dump(dcngettext("test","test","test",0,0)); +var_dump(dcngettext("test","test","test",0,1)); var_dump(dcngettext("test","test","test",-1,-1)); var_dump(dcngettext("","","",1,1)); -var_dump(dcngettext("","","",0,0)); +var_dump(dcngettext("","","",0,1)); echo "Done\n"; ?> From 611af05c50685acbb22f0f9d18dd37234c3546f1 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 8 Dec 2023 13:36:52 +0100 Subject: [PATCH 7/8] [skip ci] Skip intermittently failing curl test on macOS The test fails with "CURL ERROR: 56". I will create an issue for it shortly. --- ext/curl/tests/curl_setopt_ssl.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/curl/tests/curl_setopt_ssl.phpt b/ext/curl/tests/curl_setopt_ssl.phpt index 52ff95ab34bcf..2e28466a84057 100644 --- a/ext/curl/tests/curl_setopt_ssl.phpt +++ b/ext/curl/tests/curl_setopt_ssl.phpt @@ -8,6 +8,7 @@ if (!function_exists("proc_open")) die("skip no proc_open"); exec('openssl version', $out, $code); if ($code > 0) die("skip couldn't locate openssl binary"); if (PHP_OS_FAMILY === 'Windows') die('skip not for Windows'); +if (PHP_OS_FAMILY === 'Darwin') die('skip Fails intermittently on macOS'); $curl_version = curl_version(); if ($curl_version['version_number'] < 0x074700) { die("skip: blob options not supported for curl < 7.71.0"); From 58a88ccb9f652adbd13e8c2b5186fb31213f0789 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 23 Oct 2024 19:07:59 +0200 Subject: [PATCH 8/8] Fix call to dc[n]gettext in tests with 0 $category This causes a segfault on PHP-8.1 --- Zend/tests/arginfo_zpp_mismatch.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Zend/tests/arginfo_zpp_mismatch.inc b/Zend/tests/arginfo_zpp_mismatch.inc index 023bfefa5d501..27fa16547802e 100644 --- a/Zend/tests/arginfo_zpp_mismatch.inc +++ b/Zend/tests/arginfo_zpp_mismatch.inc @@ -29,6 +29,9 @@ function skipFunction($function): bool { || $function === 'posix_setrlimit' || $function === 'sapi_windows_generate_ctrl_event' || $function === 'imagegrabscreen' + // PHP-8.1 only + || $function === 'dcgettext' + || $function === 'dcngettext' ) { return true; }