diff options
Diffstat (limited to 'dev-lang/php')
| -rw-r--r-- | dev-lang/php/Manifest | 4 | ||||
| -rw-r--r-- | dev-lang/php/files/php-gh-20528-fix.patch | 81 | ||||
| -rw-r--r-- | dev-lang/php/php-8.3.28-r1.ebuild (renamed from dev-lang/php/php-8.3.27.ebuild) | 13 | ||||
| -rw-r--r-- | dev-lang/php/php-8.4.15-r1.ebuild (renamed from dev-lang/php/php-8.4.14.ebuild) | 20 | ||||
| -rw-r--r-- | dev-lang/php/php-8.5.0-r1.ebuild (renamed from dev-lang/php/php-8.5.0.ebuild) | 1 |
5 files changed, 86 insertions, 33 deletions
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest index 29547c46c36b..972e4180e62f 100644 --- a/dev-lang/php/Manifest +++ b/dev-lang/php/Manifest @@ -1,5 +1,5 @@ DIST php-8.2.29.tar.xz 12162364 BLAKE2B 5750dde1e75e0886fb583c4571f3802fc8d6ae30848fa5e423838e612b65414af05a6354896a86f35ebde292ad3b6c171c8f42cda85ea79216743194153112b9 SHA512 36d389e43a9d6bdc558f5e949f54e126c6fd4bf00da572e061e4e4c2f62ffeb292a34371486d3a64b85ab4a18678f7d84b2e3628e0ddc723a7757e90fecdbf92 DIST php-8.3.26.tar.xz 12581368 BLAKE2B e47b603400f36dfcba2bde85ef64b55d95f156ca4745b7edf14f0b9fa6027158486511e95b9d8440d05321d8540f71c30fb1c2ceb601c62f02838356c5902f6d SHA512 252c0c95bb2c4d6bf03e686c205777b529aaebe52f143754b369069d7a8aa5b45e8c2addb968287d6473cee507df62729e2527607b796fb764d3f036ba89fafb -DIST php-8.3.27.tar.xz 12592316 BLAKE2B 12b3d14443816e78b7bf70f9f8600116adbd00e46e524ca4408bd1cc1e06782c50a9806bec074e49babca8337cdf0f136189a7d9f611c302b5b3323bdc9fa2c2 SHA512 845189f97063574ef1f677d6ceb39c5ef362cab7068f908d6d870a1ea52953d6ec00b3bf042ce2daa6c2a84038a64f2ae6027ede9ae5952028a94f781200e306 -DIST php-8.4.14.tar.xz 13643936 BLAKE2B 47cfcf6a3d2a005a2100eb959f05c70736f5f62244ef67be44055c0e66ea5222c43b7d6b2c0f2ab05b719e1492e81475908ab739fe8728730f5a2dfeefe00175 SHA512 a7626f8dc1b951bf845e72884a4dcc622a06159de623772a97ef5ccb20930a85273db81e98e933c26982ba3a539847b61bbe86bba4792f5fee49a9c91814a63b +DIST php-8.3.28.tar.xz 12604244 BLAKE2B b6a0daa396429c79f9a0d235de1fc8f16044d33c8b0df90db22337a079594d6c671a24cf533e9232294558eeca52d6f8c4cec5c10018954dd71e31b628feaf00 SHA512 8dc88361d59710e165239e16a8c976230d3e355c73c1c44126701591fcc02cf97e223dae51349319eca09191311a15f5596a3341ed09ed7b9cb40c1e230c6fd4 +DIST php-8.4.15.tar.xz 13652564 BLAKE2B 0a43916a89c03cd1c397aaf3442b687c7349c10a6f3b222f510ae31610615aa034604c66a54175b379d72f2c55d05ba6092d9f8bcbcb9ab8fc5136ddf68f1443 SHA512 0ebb2b2e4448959cb12bafba32a879b9a65e785ddc41b2e928f634f7e90df18503ef915bec62e37667c4ce29c577de325cd0e04e214267757c999d2470882705 DIST php-8.5.0.tar.xz 14314552 BLAKE2B 5ca0b7ff94f363143b264326edf576c9f84bff607704ee119680948439db20f3db61f88c7ce8f46447bcac5c57238dd6bbab2b48d507b9547ce661d0d1d6a712 SHA512 b003f61e491b4848ea61a15eab7d7b1b932364c54687ad6c0b24fd36338c358afceb761f5b7e446dc05dbb76e7086b014bac0c91e9bf7ec55c16be2ac8c71940 diff --git a/dev-lang/php/files/php-gh-20528-fix.patch b/dev-lang/php/files/php-gh-20528-fix.patch new file mode 100644 index 000000000000..f8a790a48acd --- /dev/null +++ b/dev-lang/php/files/php-gh-20528-fix.patch @@ -0,0 +1,81 @@ +From 9d71c1e0b60cd152a47528dbe514efc443fce920 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Thu, 20 Nov 2025 02:58:45 +0100 +Subject: [PATCH] Fix GH-20528: Regression breaks mysql connexion using an IPv6 + address enclosed in square brackets + +--- + ext/mysqli/tests/mysqli_connect_port.phpt | 31 +++++++++++++++++++++++ + ext/mysqlnd/mysqlnd_connection.c | 17 ++++++++++--- + 2 files changed, 45 insertions(+), 3 deletions(-) + create mode 100644 ext/mysqli/tests/mysqli_connect_port.phpt + +diff --git a/ext/mysqli/tests/mysqli_connect_port.phpt b/ext/mysqli/tests/mysqli_connect_port.phpt +new file mode 100644 +index 0000000000000..cb7fd1d8d1628 +--- /dev/null ++++ b/ext/mysqli/tests/mysqli_connect_port.phpt +@@ -0,0 +1,31 @@ ++--TEST-- ++mysqli_connect() with port in host ++--EXTENSIONS-- ++mysqli ++--SKIPIF-- ++<?php ++require_once 'skipifconnectfailure.inc'; ++?> ++--FILE-- ++<?php ++ require_once 'connect.inc'; ++ ++ // using port / host arguments ++ if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { ++ printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", ++ $host, $user, $db, $port, $socket); ++ } ++ ++ mysqli_close($link); ++ ++ // using port in host ++ if (!$link = mysqli_connect("$host:$port", $user, $passwd, $db, "1$port", $socket)) { ++ printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", ++ "$host:$port", $user, $db, "1$port", $socket); ++ } ++ ++ mysqli_close($link); ++?> ++Done ++--EXPECTF-- ++Done +diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c +index d8e7304e9665f..8268034e8b798 100644 +--- a/ext/mysqlnd/mysqlnd_connection.c ++++ b/ext/mysqlnd/mysqlnd_connection.c +@@ -553,13 +553,24 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_ + port = 3306; + } + +- /* ipv6 addresses are in the format [address]:port */ + if (hostname.s[0] != '[' && mysqlnd_fast_is_ipv6_address(hostname.s)) { ++ /* IPv6 without square brackets so without port */ + transport.l = mnd_sprintf(&transport.s, 0, "tcp://[%s]:%u", hostname.s, port); + } else { +- /* Not ipv6, but could already contain a port number, in which case we should not add an extra port. ++ char *p; ++ ++ /* IPv6 addresses are in the format [address]:port */ ++ if (hostname.s[0] == '[') { /* IPv6 */ ++ p = strchr(hostname.s, ']'); ++ if (p && p[1] != ':') { ++ p = NULL; ++ } ++ } else { /* IPv4 or name */ ++ p = strchr(hostname.s, ':'); ++ } ++ /* Could already contain a port number, in which case we should not add an extra port. + * See GH-8978. In a port doubling scenario, the first port would be used so we do the same to keep BC. */ +- if (strchr(hostname.s, ':')) { ++ if (p) { + /* TODO: Ideally we should be able to get rid of this workaround in the future. */ + transport.l = mnd_sprintf(&transport.s, 0, "tcp://%s", hostname.s); + } else { diff --git a/dev-lang/php/php-8.3.27.ebuild b/dev-lang/php/php-8.3.28-r1.ebuild index 14fca609ecae..eeb2d83be1e7 100644 --- a/dev-lang/php/php-8.3.27.ebuild +++ b/dev-lang/php/php-8.3.28-r1.ebuild @@ -136,6 +136,7 @@ BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}/php-8.3.9-gd-cachevars.patch" "${FILESDIR}/php-8.4.14-libpcre2-testfix.patch" + "${FILESDIR}/php-gh-20528-fix.patch" ) PHP_MV="$(ver_cut 1)" @@ -269,18 +270,6 @@ src_prepare() { ext/gd/tests/bug73272.phpt \ || die - # Test requires truetype support - if ! use truetype; then - rm ext/gd/tests/gh19955.phpt - fi - - # Should be OK in the next version, but this test required network - # access when it was added: - # - # https://github.com/php/php-src/pull/19776 - # - rm sapi/cli/tests/php_cli_server_ipv6_error_message.phpt || die - # One-off, somebody forgot to update a version constant rm ext/reflection/tests/ReflectionZendExtension.phpt || die diff --git a/dev-lang/php/php-8.4.14.ebuild b/dev-lang/php/php-8.4.15-r1.ebuild index 2132cc3c040a..4bd782790454 100644 --- a/dev-lang/php/php-8.4.14.ebuild +++ b/dev-lang/php/php-8.4.15-r1.ebuild @@ -133,6 +133,7 @@ BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}/php-8.4.14-libpcre2-testfix.patch" + "${FILESDIR}/php-gh-20528-fix.patch" ) PHP_MV="$(ver_cut 1)" @@ -269,25 +270,6 @@ src_prepare() { rm ext/dba/tests/gh19706.phpt fi - # Test fails in a sandboxed/offline environment, - # already fixed upstream, but not yet in this release - # - # https://github.com/php/php-src/pull/19776 - # - rm sapi/cli/tests/php_cli_server_ipv4_error_message.phpt || die - - # Test requires truetype support - if ! use truetype; then - rm ext/gd/tests/gh19955.phpt - fi - - # Should be OK in the next version, but this test required network - # access when it was added: - # - # https://github.com/php/php-src/pull/19776 - # - rm sapi/cli/tests/php_cli_server_ipv6_error_message.phpt || die - # One-off, somebody forgot to update a version constant rm ext/reflection/tests/ReflectionZendExtension.phpt || die diff --git a/dev-lang/php/php-8.5.0.ebuild b/dev-lang/php/php-8.5.0-r1.ebuild index 2bbf0915086c..361726f19417 100644 --- a/dev-lang/php/php-8.5.0.ebuild +++ b/dev-lang/php/php-8.5.0-r1.ebuild @@ -133,6 +133,7 @@ BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}/php-8.4.14-libpcre2-testfix.patch" + "${FILESDIR}/php-gh-20528-fix.patch" ) PHP_MV="$(ver_cut 1)" |
