Alexandre Daubois
096938fd4a
Remove report_memleaks
entry from php.ini-* ( #19502 )
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / FREEBSD (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
2025-08-16 11:41:03 -07:00
David Carlier
1299376b8f
Merge branch 'PHP-8.4'
2025-08-16 19:28:11 +01:00
David Carlier
0fc3a2e624
Merge branch 'PHP-8.3' into PHP-8.4
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
2025-08-16 19:28:00 +01:00
Arjen de Korte
a97717d23e
Fix GH-19021: deprecation for tidyOptIsReadOnly
...
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / MACOS_DEBUG_NTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
The tidyOptGetCategory function (added in libtidy 5.4.0) if only useable if TidyInternalCategory (added in libtidy 5.6.0) is also present, so check for the latter instead.
close GH-19053
2025-08-16 19:24:47 +01:00
Alexandre Daubois
010fe2bb42
[RFC] Deprecate constant redeclaration ( #19474 )
...
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-16 09:54:37 -07:00
Daniel Scherzer
dbf0102b15
NEWS/UPGRADING for ArrayObject and ArrayIterator with objects deprecation
2025-08-16 08:45:40 -07:00
David CARLIER
9b30788f8c
ci: enable _GLIBCXX_ASSERTIONS c++ flags on debug builds. ( #19497 )
...
Enable additional C++ runtime checks for the intl extensions.
Basically, out-of-bounds accesses on vector or strings, undefined
behavior on iterators.
2025-08-16 13:51:30 +01:00
Tim Düsterhus
092127cf25
gen_stub: Update to PHP-Parser 5.6.1 ( #19495 )
...
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
This fixes a PHP 8.5 Deprecation:
> Deprecated: Method SplObjectStorage::attach() is deprecated since 8.5, use
> method SplObjectStorage::offsetSet() instead in
> php-src/build/PHP-Parser-5.6.0/lib/PhpParser/Parser/Php7.php on line 2692
2025-08-16 14:04:56 +02:00
Alexandre Daubois
a84a82ed88
Deprecate disabling report_memleaks
INI directive ( #19481 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_report_memleaks_ini_directive
2025-08-16 14:04:34 +02:00
Daniel Scherzer
7ca21d2e07
UPGRADING: Document NoDiscard new class [skip ci] ( #19492 )
2025-08-15 13:34:21 -07:00
Gina Peter Banyard
4d3ccc21d0
main: drop unnecessary zend_{try|catch} in user stream open wrapper
...
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
This was initially introduced with 9f86cdaf7f
However, this should also have been done for the opendir call.
This omission was found via OSS-Fuzz 51047 [1]
and fixed in a more general way in d0b3096ff0
by resetting `FG(user_stream_current_filename)` at the end of the request during shutdown.
As such this zend_try/zend_catch block is now unnecessary.
[1]: https://issues.oss-fuzz.com/issues/42515581
2025-08-15 18:41:17 +02:00
Gina Peter Banyard
1c67b060c4
main: Add bailout tests for dir opening on user stream
2025-08-15 18:41:17 +02:00
Gina Peter Banyard
0992265611
main: refactor userstream method calling
...
Closes GH-19312
2025-08-15 18:41:17 +02:00
Alexandre Daubois
e5f81bd74c
spl: Use size_t
to store spl_heap
’s count ( #19482 )
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
2025-08-15 09:50:49 +02:00
David Carlier
b73d8b373a
Merge branch 'PHP-8.4'
2025-08-15 08:08:16 +01:00
David Carlier
fd4db3e178
Merge branch 'PHP-8.3' into PHP-8.4
Push / MACOS_ARM64_DEBUG_NTS (push) Has been cancelled
Push / WINDOWS_X64_ZTS (push) Has been cancelled
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
2025-08-15 08:05:14 +01:00
Mark Karpeles
987a3a5c8e
Fix GH-19484 i: potential use after free when using persistent pgsql connections.
...
Push / WINDOWS_X64_ZTS (push) Has been cancelled
Push / MACOS_DEBUG_NTS (push) Has been cancelled
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / FREEBSD (push) Has been skipped
By setting the notice processor to a no-op when a persistent connection is cleaned for future use.
Close GH-19485
2025-08-15 08:04:14 +01:00
Niels Dossche
dcd3ef33b3
Realign entries
2025-08-15 08:41:56 +02:00
Niels Dossche
1bba07ecc0
partitioned option for setcookie/setrawcookie and sessions
...
RFC: https://wiki.php.net/rfc/CHIPS
Closes GH-12646.
Closes GH-12652.
2025-08-15 08:41:24 +02:00
Gina Peter Banyard
f9d95c649e
Update NEWS and UPGRADING for chr() deprecation
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
2025-08-14 20:51:30 +01:00
Gina Peter Banyard
cab46b27b9
ext/standard: Deprecate passing integers outside the interval [0, 255] to chr() ( #19441 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_integers_outside_the_interval_0_255_to_chr
2025-08-14 20:48:48 +01:00
Alexandre Daubois
6009b8a100
Fix GH-19476: pipe operator fails to correctly handle returning by reference (GH-19478)
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
2025-08-14 16:34:21 +02:00
Gina Peter Banyard
fb87b14b6c
ext/spl: Deprecate ArrayObject and ArrayIterator with objects ( #19420 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_arrayobject_and_arrayiterator_with_objects
This also moves tests into a subfolder.
2025-08-14 12:38:57 +01:00
Ilija Tovilo
9c754baa99
Merge branch 'PHP-8.4'
...
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
* PHP-8.4:
Fix "Constant already defined" warning with repeated inclusion of file with __halt_compiler()
2025-08-14 12:16:16 +02:00
Ilija Tovilo
708d8e9cfd
Merge branch 'PHP-8.3' into PHP-8.4
...
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
* PHP-8.3:
Fix "Constant already defined" warning with repeated inclusion of file with __halt_compiler()
2025-08-14 12:15:00 +02:00
Ilija Tovilo
a3de2ce9ba
Fix "Constant already defined" warning with repeated inclusion of file with __halt_compiler()
...
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / FREEBSD (push) Has been skipped
Push / MACOS_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Fixes GH-18850
Closes GH-19471
2025-08-14 12:13:50 +02:00
Tim Düsterhus
359f4420a4
Merge branch 'PHP-8.4'
...
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / FREEBSD (push) Has been skipped
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
* PHP-8.4:
Update GitHub Action workflows to `actions/checkout@v5`
2025-08-13 19:10:23 +02:00
Tim Düsterhus
391d8132b6
Merge branch 'PHP-8.3' into PHP-8.4
...
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
* PHP-8.3:
Update GitHub Action workflows to `actions/checkout@v5`
2025-08-13 19:09:20 +02:00
Tim Düsterhus
fdd27472de
Merge branch 'PHP-8.2' into PHP-8.3
...
Push / MACOS_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
* PHP-8.2:
Update GitHub Action workflows to `actions/checkout@v5`
2025-08-13 19:08:30 +02:00
Tim Düsterhus
aa992f36d3
Merge branch 'PHP-8.1' into PHP-8.2
...
Push / LINUX_X64_RELEASE_ZTS (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Failing after 1m16s
Push / LINUX_X64_DEBUG_NTS (push) Has been skipped
Push / FREEBSD (push) Has been skipped
Push / MACOS_DEBUG_NTS (push) Has been cancelled
Push / WINDOWS_X64_ZTS (push) Has been cancelled
* PHP-8.1:
Update GitHub Action workflows to `actions/checkout@v5`
2025-08-13 19:08:06 +02:00
Tim Düsterhus
2650248a92
Update GitHub Action workflows to actions/checkout@v5
...
Push / LINUX_X64_RELEASE_ZTS (push) Has been skipped
Push / LINUX_X64_DEBUG_NTS (push) Has been skipped
Push / FREEBSD (push) Has been skipped
Push / MACOS_DEBUG_NTS (push) Has been cancelled
Push / WINDOWS_X64_ZTS (push) Has been cancelled
Keep this up to date in all non-security-only branches, because the node.js
runtime for older versions might get deprecated in the future and fixing this
for all branches at once is easier.
see 45e60e585e
2025-08-13 19:06:09 +02:00
Dmitry Stogov
222f7517a1
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Added test for PR #19458
2025-08-13 15:59:57 +03:00
Dmitry Stogov
cbb9ee8f5b
Added test for PR #19458
...
Thanks to @DanielEScherzer
2025-08-13 15:58:04 +03:00
Ilija Tovilo
fd8dfe1bfd
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-16649: Avoid UAF when using array_splice
2025-08-13 14:16:50 +02:00
Ilija Tovilo
7e01cf59bb
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-16649: Avoid UAF when using array_splice
2025-08-13 14:16:12 +02:00
Alexandre Daubois
c8774f9e61
Fix GH-16649: Avoid UAF when using array_splice
...
Closes GH-19399
2025-08-13 14:15:34 +02:00
Alexandre Daubois
bf64dfcd99
Add an enum for HASH_KEY_IS_* constants (GH-19376)
2025-08-13 13:59:01 +02:00
Dmitry Stogov
290c9aef56
Eliminate useless spill stores ( #19467 )
2025-08-13 13:46:14 +03:00
Calvin Buckley
60047025db
Remove references to ODBCVER and assume ODBC 3.x ( #19453 )
...
* Remove references to ODBCVER and assume ODBC 3.x
See https://wiki.php.net/rfc/deprecations_php_8_5#remove_support_for_older_odbc_versions
* Avoid calling deprecated ODBC functions
`SQLGetConnectOption`, `SQLSetConnectOption` and `SQLSetStmtOption` are
deprecated, so if ODBC 3 is available, we use `SQLSetConnectAttr`,
`SQLGetConnectAttr`, and `SQLSetStmtAttr` instead.
(This is based on GH-17556, but just assumes ODBC 3.x.)
* Remove wrappers for SQLColAttribute
We don't need to support the old way of doing it.
* Just call SQLAllocHandle directly
Again, no need for the version specific wrapper
* Update NEWS for ODBCVER in beta2
* [skip ci] UPGRADING for ODBCVER changes
---------
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2025-08-12 18:05:43 -03:00
Niels Dossche
77dace78c3
[ci skip] Fix UPGRADING formatting
2025-08-12 22:35:47 +02:00
Niels Dossche
841f0b1515
Remove dead error checks for php_stream_filter_alloc() ( #19194 )
...
php_stream_filter_alloc() can't fail, so simplify the code.
2025-08-12 22:18:39 +02:00
Jakub Zelenka
ba97d8636a
Merge branch 'PHP-8.4'
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
2025-08-12 17:30:07 +02:00
Jakub Zelenka
c8a4207400
Merge branch 'PHP-8.3' into PHP-8.4
Push / MACOS_ARM64_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
2025-08-12 17:29:18 +02:00
Jakub Zelenka
2b415e416e
Fix GH-19245: Success error message on TLS stream accept failure
...
Push / MACOS_DEBUG_NTS (push) Waiting to run
Push / WINDOWS_X64_ZTS (push) Waiting to run
Push / LINUX_X64_RELEASE_NTS (push) Has been skipped
Push / LINUX_X64_DEBUG_ZTS_ASAN (push) Has been skipped
Push / LINUX_X32_DEBUG_ZTS (push) Has been skipped
Push / BENCHMARKING (push) Has been skipped
Push / FREEBSD (push) Has been skipped
This overwrites the previous message from the successful accept call.
Closes GH-19246
2025-08-12 17:28:33 +02:00
Eric Mann
b9ae9845ad
Merge branch 'PHP-8.4'
...
* PHP-8.4:
PHP-8.3 is now for PHP 8.3.26-dev
2025-08-12 08:19:01 -07:00
Eric Mann
4aa43e2cd3
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
PHP-8.3 is now for PHP 8.3.26-dev
2025-08-12 08:17:38 -07:00
Eric Mann
a0bd2c9fcf
PHP-8.3 is now for PHP 8.3.26-dev
2025-08-12 08:15:40 -07:00
Saki Takamachi
2f9e1adbdd
Merge branch 'PHP-8.4'
...
* PHP-8.4:
PHP-8.4 is now for PHP 8.4.13-dev
2025-08-12 23:49:46 +09:00
Saki Takamachi
b7c26eb16c
PHP-8.4 is now for PHP 8.4.13-dev
2025-08-12 23:46:26 +09:00
Volker Dusch
fb7db498fb
[ci skip] Update NEWS for PHP 8.5.0 beta1
2025-08-12 16:31:18 +02:00
Jakub Zelenka
20c8c12d9e
Fix #81724 : openssl_cms_encrypt only allows specific ciphers
...
The allows cipher_algo to be specified as a string. It means the not
only predefined ID ciphers are available which means that also auth
enveloped data can be created using AES GCM.
Closes GH-19459
2025-08-12 15:52:09 +02:00
Jiří Pudil
38beb44176
[RFC] Extend #[\Override] to target properties ( #19061 )
...
RFC: https://wiki.php.net/rfc/override_properties
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2025-08-12 15:18:50 +02:00
Daniel Scherzer
c3bee21256
NEWS/UPGRADING for recent deprecations
2025-08-12 06:05:09 -07:00
Daniel Scherzer
57a88b216c
[RFC] Deprecate ReflectionProperty::getDefaultValue() without default ( #19457 )
...
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:50:27 -07:00
Daniel Scherzer
ffdc1044c9
[RFC] Deprecate ReflectionClass::getConstant() for missing constants ( #19456 )
...
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:50:20 -07:00
Daniel Scherzer
a68f3d6374
[RFC] Deprecate imagedestroy() ( #19454 )
...
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:50:09 -07:00
Daniel Scherzer
699e5632b1
[RFC] Deprecate curl_share_close() ( #19452 )
...
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:49:52 -07:00
Daniel Scherzer
9b13bb1ae4
[RFC] Deprecate curl_close() ( #19451 )
...
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:44:41 -07:00
Daniel Scherzer
4de2ec3895
[RFC] Deprecate xml_parser_free() ( #19449 )
...
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:44:32 -07:00
Ilija Tovilo
65c961436d
Merge branch 'PHP-8.4'
...
* PHP-8.4:
[skip ci] Add timeout for FreeBSD
2025-08-12 14:19:11 +02:00
Ilija Tovilo
571bded46e
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
[skip ci] Add timeout for FreeBSD
2025-08-12 14:19:04 +02:00
Ilija Tovilo
347723af05
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
[skip ci] Add timeout for FreeBSD
2025-08-12 14:18:53 +02:00
Ilija Tovilo
0c044b35b7
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
[skip ci] Add timeout for FreeBSD
2025-08-12 14:18:44 +02:00
Ilija Tovilo
abb7f2879e
[skip ci] Add timeout for FreeBSD
...
Unfortunately, these jobs routinely fail to boot correctly. In this case,
they'll stall and block CI for 6 hours until they finally fail. Add a limit to
make them fail earlier.
2025-08-12 14:17:33 +02:00
Gina Peter Banyard
2b5d978a85
Update NEWS and UPGRADING
2025-08-12 11:53:37 +01:00
Jorg Adam Sowa
25cbc15719
RFC: Deprecate date constant RFC7231 ( #12989 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_date_rfc7231_and_datetimeinterfacerfc7231
2025-08-12 11:33:38 +01:00
Alexandre Daubois
dfa1307a64
Various return types and values consolidation ( #19418 )
2025-08-12 11:28:41 +01:00
Daniel Scherzer
3dc962b9f7
[RFC] Deprecate returning null from __debugInfo() ( #19455 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_debuginfo_returning_null
2025-08-12 11:15:18 +01:00
Tim Düsterhus
3d9d68e1ca
zend_compile: Deprecate backticks as an alias for shell_exec()
( #19443 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_backticks_as_an_alias_for_shell_exec
2025-08-12 12:02:13 +02:00
Derick Rethans
4d6dde595c
Emit EXT_STMT after each pipe stage, and attach the TMP var that holds the intermediary result ( #19377 )
...
* Emit EXT_STMT after each pipe stage, and attach the TMP var that holds the intermediary result
* Add ZEND_EXT_STMT to keeps_op1_alive as per review
* Fix leak with EXT_STMT when pipe result is unused
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2025-08-12 10:26:06 +01:00
Dmitry Stogov
07a9c25c71
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix Nightly workflow Symfony assertion (ir_ra.c:326: ir_fix_live_range: Assertion `ival && p->start == old_start' failed) (#19458 )
2025-08-12 11:59:26 +03:00
Dmitry Stogov
47f9f3a3f6
Fix Nightly workflow Symfony assertion (ir_ra.c:326: ir_fix_live_range: Assertion `ival && p->start == old_start' failed) ( #19458 )
2025-08-12 11:59:08 +03:00
Niels Dossche
4d74dd0395
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-19065: Long match statement can segfault compiler during recursive SSA renaming
2025-08-11 23:05:56 +02:00
Niels Dossche
8b5231388c
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-19065: Long match statement can segfault compiler during recursive SSA renaming
2025-08-11 23:05:50 +02:00
Niels Dossche
9b86533ce4
Fix GH-19065: Long match statement can segfault compiler during recursive SSA renaming
...
On some systems, like Alpine, the thread stack size is small by default.
The last step of SSA construction involves variable renaming that is
recursive, and also makes copies of their version of the renamed
variables on the stack. This combination causes a stack overflow during
compilation on Alpine. Triggerable for example with very long match
statements.
A stop-gap solution would be to use heap allocated arrays for the
renamed variable list, but that would only delay the error as increasing
the number of match arms increases the depth of the dominator tree, and
will eventually run into the same issue.
This patch transforms the algorithm into an iterative one.
There are two states stored in a worklist stack: positive numbers
indicate that the block still needs to undergo variable renaming.
Negative numbers indicate that the block and its dominated children are
already renamed. Because 0 is also a valid block number, we bias the
block numbers by adding 1.
To restore to the right variant when backtracking the "recursive" step,
we index into an array pointing to the different variable renaming
variants.
Closes GH-19083.
2025-08-11 23:05:21 +02:00
Jakub Zelenka
10834d1572
Fix #47728 : Add missing openssl constants
...
This adds PKCS7_NOSMIMECAP, PKCS7_CRLFEOL, PKCS7_NOCRL and
PKCS7_NO_DUAL_CONTENT constants. They might be potentially useful
in some scenarious.
Test is not added as it is not clear if there is much need for those and
it would require much bigger effort just to test OpenSSL functionality.
Closes GH-19450
2025-08-11 20:46:14 +02:00
Jakub Zelenka
c5f79b8cf9
Use OpenSSL libctx for various BIO readers ( #19448 )
...
This converts mostly PEM readers but also DER for CMS
2025-08-11 18:21:38 +02:00
Daniel Scherzer
6280dfc025
UPGRADING: document #[\Attribute] validation from GH-19154
...
[skip ci]
2025-08-11 09:17:06 -07:00
Daniel Scherzer
c416191a00
GH-19153: Validate #[\Attribute]
targets ( #19154 )
...
Do not allow #[\Attribute] on traits, interfaces, enums, or abstract classes.
2025-08-11 09:05:57 -07:00
Theodore Brown
5f8d648af6
Deprecate terminating case statements with a semicolon ( #19215 )
...
Part of https://wiki.php.net/rfc/deprecations_php_8_5
Closes GH-15258
2025-08-11 14:18:06 +02:00
Tim Düsterhus
d01aa02ef5
UPGRADING: Fix formatting
2025-08-11 13:42:52 +02:00
Jakub Zelenka
702d18de99
Implement #80495 : Enable to set padding in openssl_(sign|verify)
...
This adds support for RSA PSS padding.
Closes GH-19432
2025-08-11 13:11:10 +02:00
Niels Dossche
8f1a627e79
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Backport Lexbor changes to 8.4
2025-08-10 14:21:47 +02:00
Niels Dossche
91665eaa63
Backport Lexbor changes to 8.4
2025-08-10 14:17:19 +02:00
Niels Dossche
33d38d059e
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-19383: php-8.3.24: Missing type in function definition: fpm_event_kqueue_clean
2025-08-10 13:25:47 +02:00
Niels Dossche
19ffe572bb
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-19383: php-8.3.24: Missing type in function definition: fpm_event_kqueue_clean
2025-08-10 13:25:42 +02:00
Niels Dossche
b57578f3b1
Fix GH-19383: php-8.3.24: Missing type in function definition: fpm_event_kqueue_clean
...
This is just a clean backport.
2025-08-10 13:25:24 +02:00
Niels Dossche
fc86c249dc
Sync with lexbor/lexbor@49b43eba41 ( #19442 )
2025-08-10 13:16:39 +02:00
Niels Dossche
aecf2a6e62
Fix GH-18877: \Dom\HTMLDocument querySelectorAll selecting only the first when using ~ and :has
...
Backports lexbor/lexbor@971faf11a5
Closes GH-19180.
2025-08-10 13:07:13 +02:00
Gina Peter Banyard
e990b691c5
Update NEWS and UPGRADING for recent deprecation merges
2025-08-09 23:12:05 +01:00
Gina Peter Banyard
284e622506
ext/openssl: Deprecate $key_length parameter of openssl_pkey_derive() ( #19421 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_key_length_parameter_of_openssl_pkey_derive
2025-08-09 22:55:53 +01:00
Jakub Zelenka
731d36ac61
Fix OpenSSL fetching of alias ciphers
...
This does not seem like an issue as the aliases seem to be already
fetched most of the time. But there might be cases when it could be
failing like it was failing for MD in GH-19369.
It should be noted that the test does not fail without this change but
it seems useful anyway so it is added as part of this change. I
actually have not found the case where alias is not fetched for cipher
but there might be some.
Closes GH-19437
2025-08-09 23:03:26 +02:00
Jakub Zelenka
066a977840
Clean up test for GH-19369 - openssl_sign issue
2025-08-09 23:02:46 +02:00
Jakub Zelenka
c8d7318daf
Fix GH-19369: openssl_sign() - support for alias digest algs broken
...
Closes GH-19436
2025-08-09 22:06:59 +02:00
Nikita Popov
bc475ada13
Fix non-canonical casts
...
They may be deprecated, but they should still produce the correct
type...
2025-08-09 21:40:13 +02:00
Gina Peter Banyard
dc0962c243
ext/standard: Deprecate passing null to readdir(), rewinddir(), and closedir() ( #19423 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_null_to_readdir_rewinddir_and_closedir
2025-08-09 18:08:21 +01:00
Gina Peter Banyard
ba21ab4ea0
ext/finfo: Deprecate the parameter for finfo_buffer() ( #19378 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_context_parameter_for_finfo_buffer
2025-08-09 17:42:19 +01:00
Jakub Zelenka
c064fc4fe8
Fix php_openssl_pkey_derive merge issue
2025-08-09 18:25:42 +02:00
Jakub Zelenka
75931a2ce3
Merge branch 'PHP-8.4'
2025-08-09 18:02:10 +02:00
Jakub Zelenka
f52a59ff4f
Merge branch 'PHP-8.3' into PHP-8.4
2025-08-09 17:44:25 +02:00
Jakub Zelenka
9e2aa658a8
Fix GH-19428: openssl_pkey_derive segfaults for DH derive with low key_length
...
This happens only for OpenSSL 1.1.1 because key_length is ignored for
DH. It means that the provided string is overwritten with longer buffer.
2025-08-09 17:43:04 +02:00
Gina Peter Banyard
69f67f990d
ext/intl: Deprecate intl.error_level INI setting ( #19430 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_intlerror_level_ini_setting
2025-08-09 16:28:47 +01:00
David CARLIER
2bb98cd8c8
ext/int: IntlTimeZone converting few intl error to exceptions. ( #13477 )
2025-08-09 12:50:35 +01:00
Alexandre Daubois
74c006fbab
Use proper hash_spec_result enum for return values in ext/hash ( #19386 )
2025-08-09 12:56:40 +02:00
Gina Peter Banyard
d65025b53d
Update NEWS/UPGRADING for recent commits
2025-08-09 11:49:42 +01:00
Gina Peter Banyard
16872310d5
ext/spl: Deprecate SplObjectStorage::contains(), SplObjectStorage::attach(), and SplObjectStorage::detach() ( #19424 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_splobjectstoragecontains_splobjectstorageattach_and_splobjectstoragedetach
2025-08-09 11:36:14 +01:00
Gina Peter Banyard
1e108e9ab2
ext/intl: wrap DateTimeZone constructor exception in an IntlException ( #19410 )
...
The motivation is two fold:
- Userland code that deals with ext/intl can be expected to handle IntlException but not necessarily ext/date exceptions
- This removes the possibility of superfluous warnings being emitted by ext/intl when an exception has already been thrown
2025-08-09 11:24:11 +01:00
Gina Peter Banyard
8c5c03e33a
ext/spl: Deprecate passing spl_autoload_call() to spl_autoload_unregister() ( #19422 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_spl_autoload_call_to_spl_autoload_unregister
2025-08-09 11:23:14 +01:00
Gina Peter Banyard
94a15cc92f
Deprecate the parameter of get_defined_functions() ( #19425 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_exclude_disabled_parameter_of_get_defined_functions
2025-08-09 11:22:43 +01:00
Peter Kokot
f64c6248b5
Autotools: Update ax_check_compile_flag.m4 to serial 11 ( #19127 )
...
```sh
wget -O build/ax_check_compile_flag.m4 \
https://cgit.git.savannah.gnu.org/cgit/autoconf-archive.git/plain/m4/ax_check_compile_flag.m4
```
New version of AX_CHECK_COMPILE_FLAG macro now adds the -Werror flag
automatically, if GNU-compatible compiler is detected.
2025-08-09 02:03:37 +02:00
Alexandre Daubois
7bf79ab666
Make spl_filesystem_dir_read()
return void ( #19419 )
2025-08-08 22:14:07 +01:00
Gina Peter Banyard
7b44bfd812
UPGRADING and NEWS for recent 8.5 deprecations
2025-08-08 21:45:02 +01:00
Tim Düsterhus
ccb716dcad
fileinfo: Deprecate finfo_close()
( #18396 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_finfo_close
2025-08-08 21:25:13 +01:00
Tim Düsterhus
922c225fbf
reflection: Deprecate Reflection*::setAccessible()
( #19273 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionsetaccessible
2025-08-08 21:24:41 +01:00
Tim Düsterhus
732069d98b
pdo: Deprecate the uri:
DSN scheme ( #19274 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_pdo_s_urischeme
2025-08-08 21:24:15 +01:00
Tim Düsterhus
21625006e5
standard: Deprecate socket_set_timeout()
( #19285 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_socket_set_timeout
2025-08-08 21:23:48 +01:00
Tim Düsterhus
5d86515772
mysqli: Deprecate mysqli_execute()
( #19286 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_mysqli_execute
2025-08-08 21:23:31 +01:00
Gina Peter Banyard
3bf21a0d43
Zend: Deprecate non-canonical cast names ( #19372 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_non-standard_cast_names
2025-08-08 21:22:49 +01:00
Gina Peter Banyard
43a91089ca
ext/intl: Refactor timezone parameter passing ( #19409 )
2025-08-08 21:12:43 +01:00
Niels Dossche
be2889411a
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-19397: mb_list_encodings() can cause crashes on shutdown
2025-08-08 20:33:00 +02:00
Niels Dossche
db3f6d0bf0
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-19397: mb_list_encodings() can cause crashes on shutdown
2025-08-08 20:32:55 +02:00
Niels Dossche
cc93bbb765
Fix GH-19397: mb_list_encodings() can cause crashes on shutdown
...
The request shutdown does not necessarily hold the last reference, if
there is still a CV that refers to the array.
Closes GH-19405.
2025-08-08 20:32:29 +02:00
Niels Dossche
99e6b0ecc8
Use stack allocation in timezone_initialize() ( #19394 )
...
This lives temporarily, avoid overhead and handling of heap allocation.
2025-08-08 20:29:39 +02:00
Alexandre Daubois
9673079903
Fix GH-18404: Display diff when a single test is run (GH-19400)
2025-08-08 19:16:32 +02:00
Arnaud Le Blanc
e4078a6a70
Disable opcache if no SHM backend is available
...
Currently, configure fails when no SHM backend is available. Additionally,
even after bypassing the configure check, opcache emits a fatal error if no
SHM backend is available.
Make the configure check non-fatal (a warning is printed). At runtime, disable
opcache if no backend is available, in the same way we disable opcache by
default on CLI.
Closes GH-19350
2025-08-08 14:41:37 +02:00
Gina Peter Banyard
fe88711b14
ext/intl: Use ZPP specifier for IntlTimeZone::createEnumeration() ( #19393 )
...
The existing code is extremely convoluted, incorrectly documented, and does not follow the usual semantics
2025-08-07 22:37:16 +01:00
David CARLIER
140fc69b4a
ext/intl: update from C to C++ step2. ( #19294 )
2025-08-07 22:36:34 +01:00
Gina Peter Banyard
c5143c0b22
tree: remove some usages of the report_memleaks INI setting ( #19407 )
2025-08-07 22:17:24 +01:00
Gina Peter Banyard
1f131e3ae6
[skip ci] ext/sockets: remove tests that leak memory ( #19408 )
...
I don't understand what the purposes of theses tests are.
2025-08-07 21:50:04 +01:00
Niels Dossche
a3f34043de
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-19371: integer overflow in calendar.c
2025-08-07 19:09:03 +02:00
Niels Dossche
11e6655624
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-19371: integer overflow in calendar.c
2025-08-07 19:08:58 +02:00
Niels Dossche
5cf45ba5ab
Fix GH-19371: integer overflow in calendar.c
...
Closes GH-19380.
2025-08-07 19:08:32 +02:00
Gina Peter Banyard
43420599f7
ext/intl: better errors for IntlTimeZone::createTimeZoneIDEnumeration ( #19395 )
...
IntlTimeZone::createTimeZoneIDEnumeration
And convert those to ValueErrors directly as they are bugs
2025-08-07 13:52:03 +01:00
Gina Peter Banyard
ca5667bc14
ext/intl: prevent creation of invalid UConverter instance ( #19396 )
2025-08-07 13:46:58 +01:00
Ilija Tovilo
abe75ca850
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix ERROR_CODE handling in COMMUNITY build
2025-08-07 13:56:19 +02:00
Ilija Tovilo
db5a3956f5
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix ERROR_CODE handling in COMMUNITY build
2025-08-07 13:56:12 +02:00
Ilija Tovilo
aae35f3617
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix ERROR_CODE handling in COMMUNITY build
2025-08-07 13:56:06 +02:00
Ilija Tovilo
080ba20d49
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix ERROR_CODE handling in COMMUNITY build
2025-08-07 13:55:59 +02:00
Ilija Tovilo
2cd9233e42
Fix ERROR_CODE handling in COMMUNITY build
...
We need || because a non-0 return from the application aborts the execution of
the job.
2025-08-07 13:54:55 +02:00
Arnaud Le Blanc
17826d31c6
Merge branch 'PHP-8.4'
...
* PHP-8.4:
zend call stack fixing stack limit for macOs arm64.
2025-08-07 08:42:03 +02:00
Arnaud Le Blanc
58501bd136
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
zend call stack fixing stack limit for macOs arm64.
2025-08-07 08:41:24 +02:00
David Carlier
bd2766ce79
zend call stack fixing stack limit for macOs arm64.
...
8MB sounded a prudent size for older 10.9 macOs release, however
with newer mac with arm64, it triggers a stack overflow.
Cherry picks b320aabc5e
(GH-13319) from PHP-8.4.
Closes GH-19390.
2025-08-07 08:38:40 +02:00
Arnaud Le Blanc
d1fceeec30
Check stack limit in fuzzer executor
...
The stack limit is checked when entering execute_ex(), but the fuzzer has
its own execute function and does not call execute_ex().
Add a stack limit check in the fuzzer's execute function.
Closes GH-19391
2025-08-07 08:32:02 +02:00
Gina Peter Banyard
c42e6d62d8
ext/intl: modernize tests ( #19392 )
...
This is effectively removing ZPP tests, enabling warnings, and moving INI settings into the INI PHPT block
2025-08-06 23:33:48 +01:00
Gina Peter Banyard
3fc0149325
[skip ci] drop invalid IntlDateFormat construction error test
...
The date.timezone INI setting defaults to UTC if an invalid value is provided, meaning that we construct a valid object with timezone UTC.
2025-08-06 22:15:06 +01:00
Ilija Tovilo
77eac5ec82
Merge branch 'PHP-8.4'
...
* PHP-8.4:
[skip ci] Bump retries in benchmark diff when looking for benchmarked commits
2025-08-06 22:29:49 +02:00
Ilija Tovilo
0c303b2043
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
[skip ci] Bump retries in benchmark diff when looking for benchmarked commits
2025-08-06 22:29:36 +02:00
Ilija Tovilo
44618752f9
[skip ci] Bump retries in benchmark diff when looking for benchmarked commits
2025-08-06 22:28:56 +02:00
Ilija Tovilo
c69f04dbab
Fix borked test
2025-08-06 22:25:14 +02:00
Gina Peter Banyard
aa9694bdd0
ext/date: null bytes in timezones can only happen via HT initialization ( #19357 )
...
Thus check this error condition early in the HT initialization code.
2025-08-06 21:02:25 +01:00
Arnaud Le Blanc
7af4709d38
Fix test
2025-08-06 19:57:32 +02:00
Arnaud Le Blanc
c105571052
Fix test
2025-08-06 19:55:56 +02:00
Arnaud Le Blanc
b7ac56822d
Fix build
2025-08-06 19:50:11 +02:00
Arnaud Le Blanc
32290b3529
Add opcache_preloading() internal function
...
Add a C function, opcache_preloading(), that returns true during
preloading. Extensions can use this to detect preloading, not only during
compilation/execution, but also in RINIT()/RSHUTDOWN().
Since opcache currently doesn't install any header, I'm adding a new one:
zend_accelerator_api.h. Header name is based on other files in ext/opcache.
Closes GH-19288
2025-08-06 18:21:19 +02:00
Arnaud Le Blanc
3088d64068
Remove the Opcache SAPI whitelist
...
Closes GH-19351
2025-08-06 18:14:10 +02:00
Arnaud Le Blanc
3ddbad9589
Allocate a fast thread-safe-resource id for opcache
...
Closes GH-19347
2025-08-06 18:02:43 +02:00
Gina Peter Banyard
5583273906
ext/ldap: Use size_t type instead of int type
2025-08-06 16:36:13 +01:00
Gina Peter Banyard
61790eb8a0
ext/ldap: Use uint32_t type instead of int type
2025-08-06 16:36:13 +01:00
Gina Peter Banyard
9af00b174a
ext/ldap: Use bool type instead of int type
2025-08-06 16:36:13 +01:00
Gina Peter Banyard
53fde8b5a8
ext/ldap: Remove useless variable
2025-08-06 16:36:13 +01:00
Gina Peter Banyard
b5fb9555e1
ext/ldap: Reduce scope of variable
2025-08-06 16:36:13 +01:00
Gina Peter Banyard
1c820750da
ext/ldap: Add static specifier for private function
2025-08-06 16:36:13 +01:00
Gina Peter Banyard
2e53aef1e8
ext/ldap: Remove unused include statement
2025-08-06 16:36:13 +01:00
Ilija Tovilo
e30a8a883f
Merge branch 'PHP-8.4'
...
* PHP-8.4:
[skip ci] Fix Symfony COMMUNITY build for new phpunit version
2025-08-06 15:10:23 +02:00
Ilija Tovilo
c3467bd173
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
[skip ci] Fix Symfony COMMUNITY build for new phpunit version
2025-08-06 15:10:17 +02:00
Ilija Tovilo
3aa4209ef6
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
[skip ci] Fix Symfony COMMUNITY build for new phpunit version
2025-08-06 15:10:07 +02:00
Ilija Tovilo
a8cea0c09b
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
[skip ci] Fix Symfony COMMUNITY build for new phpunit version
2025-08-06 15:10:01 +02:00
Ilija Tovilo
0ac37fb74d
[skip ci] Fix Symfony COMMUNITY build for new phpunit version
...
--exclude-group no longer accepts a comma-separated list. Doc block comments are
no longer supported, switch to attributes.
2025-08-06 15:07:45 +02:00
Ilija Tovilo
81c0aeaf5d
Merge branch 'PHP-8.4'
...
* PHP-8.4:
[skip ci] Skip segfaulting OOM test in GH actions on Win
2025-08-06 14:29:46 +02:00
Ilija Tovilo
0b1aa86c71
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
[skip ci] Skip segfaulting OOM test in GH actions on Win
2025-08-06 14:29:36 +02:00
Ilija Tovilo
5be04e25fd
[skip ci] Skip segfaulting OOM test in GH actions on Win
...
This only fails on the PHP-8.3 branch, most likely to be related to the
environment as discussed with Niels.
2025-08-06 14:28:47 +02:00
Ilija Tovilo
63cb81ff2c
Merge branch 'PHP-8.4'
...
* PHP-8.4:
COMMUNTIY build grouping adjustments
2025-08-06 14:20:39 +02:00
Ilija Tovilo
d628ed5963
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
COMMUNTIY build grouping adjustments
2025-08-06 14:20:32 +02:00
Gina Peter Banyard
1e0c8baf05
tree: drop non canonical casts and ZPP tests
2025-08-06 13:20:28 +01:00
Ilija Tovilo
bf6a74d2f9
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
COMMUNTIY build grouping adjustments
2025-08-06 14:20:26 +02:00
Ilija Tovilo
9cbc09d189
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
COMMUNTIY build grouping adjustments
2025-08-06 14:20:17 +02:00
Ilija Tovilo
a63e97667e
COMMUNTIY build grouping adjustments
...
Unconditionally execute assignment of EXIT_CODE. Otherwise, the variable bleeds
into the next iteration. Also add newline before ::endgroup::. ASAN does not add
a trailing newline.
2025-08-06 14:18:43 +02:00
Ilija Tovilo
14034ad734
Merge branch 'PHP-8.4'
...
* PHP-8.4:
[skip ci] Add fuzzer binaries to .gitignore
2025-08-06 14:01:32 +02:00
Ilija Tovilo
e7c8361089
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
[skip ci] Add fuzzer binaries to .gitignore
2025-08-06 14:01:25 +02:00
Ilija Tovilo
c286cb8a1e
[skip ci] Add fuzzer binaries to .gitignore
2025-08-06 14:00:44 +02:00
Shivam Mathur
4a934005b4
Fix Windows test for openssl-3.5 upgrade ( #19384 )
...
* Fix Windows test for openssl-3.5 upgrade
* Update ext/openssl/tests/check_default_conf_path.phpt
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
---------
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2025-08-06 16:11:38 +05:30
Derick Rethans
a9ab62d54d
Add a brief section on options to the test runner, and -j
2025-08-06 10:05:27 +01:00
Derick Rethans
0c82801384
Setting TEST_PHP_EXECUTABLE hasn't been necessary for ages.
2025-08-06 09:48:46 +01:00
Shivam Mathur
1820dd9b61
Merge branch 'PHP-8.4'
2025-08-06 00:05:47 +00:00
Shivam Mathur
6147be32fc
Merge branch 'PHP-8.3' into PHP-8.4
2025-08-06 00:05:28 +00:00
Shivam Mathur
f08ac4f1c9
Merge branch 'PHP-8.2' into PHP-8.3
2025-08-06 00:04:58 +00:00
Shivam Mathur
871de14ceb
Merge branch 'PHP-8.1' into PHP-8.2
2025-08-06 00:03:49 +00:00
Shivam Mathur
8199cad99f
Fix master branch check in find-target-branch.bat ( #19385 )
2025-08-06 05:32:36 +05:30
David CARLIER
d801a4634f
Fixed GH-19381: posix_kill_pidoverflow test depends on pcntl too. ( #19382 )
2025-08-05 20:03:21 +01:00
David CARLIER
9ccd2ba9ff
Fixed GH-19163 fix ext/intl build on midly older compilers but still supporting C++11. ( #19353 )
2025-08-05 19:09:37 +01:00
Gina Peter Banyard
5b3d0e4c09
ext/json: Refactor php_json_encode_array()
...
Stop relying on internal flags which were published in the header
Use a more descriptive variable name and have it be a boolean
2025-08-05 18:21:15 +01:00
Gina Peter Banyard
17328ef86b
ext/json: Various small refactorings
2025-08-05 18:21:15 +01:00
Gina Peter Banyard
d9000b3094
tree: replace some unnecessary uses of spprintf ( #19354 )
2025-08-05 17:25:47 +01:00
Ilija Tovilo
0596135d20
Merge branch 'PHP-8.4'
...
* PHP-8.4:
[skip ci] Group component output in community job
2025-08-05 15:44:36 +02:00
Ilija Tovilo
fbc705c3bd
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
[skip ci] Group component output in community job
2025-08-05 15:44:21 +02:00
Ilija Tovilo
cdfd663266
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
[skip ci] Group component output in community job
2025-08-05 15:44:07 +02:00
Ilija Tovilo
dde094a442
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
[skip ci] Group component output in community job
2025-08-05 15:43:58 +02:00
Ilija Tovilo
1c65cc3998
[skip ci] Group component output in community job
2025-08-05 15:43:46 +02:00
Gina Peter Banyard
d0274e74f8
Zend/zend_ast: Use uint32_t type instead of int type
2025-08-05 12:43:18 +01:00
Gina Peter Banyard
8512514a0f
Zend/zend_ast: Use zend_ast_get_list() instead of cast
2025-08-05 12:43:18 +01:00
Gina Peter Banyard
36ec3370fb
Zend/zend_ast: Add const qualifier
2025-08-05 12:43:18 +01:00
Ilija Tovilo
d8e014dfbe
Merge branch 'PHP-8.4'
...
* PHP-8.4:
[skip ci] Add zend_jit_arm64.c to gitignore
2025-08-04 23:12:48 +02:00
Ilija Tovilo
9f800aedfe
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
[skip ci] Add zend_jit_arm64.c to gitignore
2025-08-04 23:12:33 +02:00
Ilija Tovilo
bfd42b060d
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
[skip ci] Add zend_jit_arm64.c to gitignore
2025-08-04 23:12:22 +02:00
Ilija Tovilo
f077c9d233
[skip ci] Add zend_jit_arm64.c to gitignore
...
This is not generated in CI since moving to macOS 14, which is arm based.
2025-08-04 23:12:09 +02:00
Ilija Tovilo
541a1e69d5
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Upgrade to macOS 14 and backport necessary changes
2025-08-04 22:21:58 +02:00
Ilija Tovilo
44d63a8ac0
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Upgrade to macOS 14 and backport necessary changes
2025-08-04 22:21:21 +02:00
Ilija Tovilo
234159d911
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Upgrade to macOS 14 and backport necessary changes
2025-08-04 22:20:06 +02:00
Ilija Tovilo
7ba4453f8f
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Upgrade to macOS 14 and backport necessary changes
2025-08-04 22:19:59 +02:00
Ilija Tovilo
e9e432a35d
Upgrade to macOS 14 and backport necessary changes
2025-08-04 22:12:30 +02:00
Ilija Tovilo
0d15bca041
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix filtering of INI directives to respect leading whitespaces
2025-08-04 16:56:59 +02:00
Ilija Tovilo
bd7ffc911d
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix filtering of INI directives to respect leading whitespaces
2025-08-04 16:56:51 +02:00
Arndt Kaiser
9d29283392
Fix filtering of INI directives to respect leading whitespaces
...
Directives are now correctly filtered out if the line in the php.ini
file begins with whitespace characters.
Closes GH-19348
2025-08-04 16:55:46 +02:00
Gina Peter Banyard
4d5bdef21a
streams: refactor statbuf_from_array()
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
9e334af6e4
streams: use type php_socket_t instead of type int
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
a02b2b8eb6
streams: use %zu printf specifier for size_t
...
Rather than casting to zend_long
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
051414bec6
streams: use an enum for return type of _php_stream_make_seekable()
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
93ec0ac0f3
streams: drop unused includes
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
fa85b38560
streams: voidify php_stream_filter_prepend_ex()
...
This only ever returned SUCCESS
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
cd13ba73e2
streams: use RETURN_BOOL() when possible
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
b46c5e6186
streams: refactor implementation of stream_select()
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
c50a715a5c
streams: remove useless casts
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
0d0f774a6a
streams: use call in if statement directly
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
fb2585f4e2
streams: use -1 directly instead of FAILURE macro
...
The result of the functions returning those globals is never checked anyway
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
4b6ebcc6e9
streams: remove confusing step variable
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
02af9acfca
streams: use precomputed persistant variable
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
67d6160462
streams: use int type instead of long
...
The flags variable is passed to the filter virtual function that requires an int
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
c9836b03ce
streams: use type size_t instead of type unsigned int
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
841afdc486
streams: use type zend_result instead of type int
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
b3551cc31f
streams: use type bool instead of type int
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
b35dbe474e
streams: reduce scope of variables
2025-08-04 15:30:57 +01:00
Gina Peter Banyard
17b8706bf6
streams: add const specifier
2025-08-04 15:30:57 +01:00
Dmitry Stogov
ef98a6e723
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Update IR
2025-08-04 17:26:46 +03:00
Dmitry Stogov
ac1cd9c26e
Update IR
...
IR commit: 6e2aea0ebfef2c741ebec30c57aa492df0d4e319
2025-08-04 17:26:24 +03:00
Alexandre Daubois
433c00b348
[skip ci] tree: Fix various typos ( #19366 )
2025-08-04 15:15:52 +01:00
Ilija Tovilo
cd80ed6f7b
Implement changes to GH-17951 according to ML discussion
2025-08-04 16:04:25 +02:00
Frederik Milling Pytlick
4e21924271
Fix GH-17951: Addition of max_memory_limit INI
...
Closes GH-18011
2025-08-04 16:04:25 +02:00
Arnaud Le Blanc
9aa8e8825f
Remove zend_jit_vm_kind ( #19299 )
...
JIT used to not have a compile-time dependency on VM kind, such that a single
build of opcache could work with different VM kinds at runtime. This has been broken
over time and would be difficult to restore. Additionally, as opcache is now
built-in, this would not be useful anymore.
Remove the zend_jit_vm_kind variable.
2025-08-04 15:52:09 +02:00
Máté Kocsis
98e0dbcefe
Opcache is always available in the previous commit of the real time benchmark
...
Now that there's one measured run after opcache is always enabled, we can change the PHP_OPCACHE back to 1.
2025-08-03 21:00:19 +02:00
Gina Peter Banyard
a66b631bce
main/php_ini: various minor refactorings ( #19339 )
2025-08-03 17:30:12 +01:00
Gina Peter Banyard
961412d6f2
main: refactor implementation of set_time_limit() ( #19338 )
2025-08-03 16:17:00 +01:00
Alexandre Daubois
345e04b619
[skip ci] Fix typos in NEWS, UPGRADING and UPGRADING.INTERNALS ( #19341 )
2025-08-02 20:36:39 +02:00
Máté Kocsis
55a3e33bb1
Do not allow concurrent runs of the real time benchmark
...
Closes GH-19345
2025-08-01 11:38:30 +02:00
Máté Kocsis
776d6f8660
Add valgrind instruction count meansurement support to manual benchmark flow
2025-08-01 11:34:31 +02:00
Máté Kocsis
e8f88e746b
Fixes the real time benchmark
...
First of all, the last successful build had been before opcache was made required - therefore the PHP_OPCACHE setting should be 2 to manually enable it.
Then, the manual flow should comment on the PR of the triggering repo (github.repository), not the repo of the benchmarked code (env.REPOSITORY).
2025-08-01 10:12:38 +02:00
Daniel Scherzer
6f630a882d
NEWS/UPGRADING: fix missing __
in __toString()
...
Forgotten by yours truly in 36ae82b73e
[skip ci]
2025-07-31 17:38:23 -07:00
Daniel Scherzer
63f9e4945d
GH-17927: Indicate virtual properties and hooks in reflection output ( #19297 )
2025-07-31 17:32:09 -07:00
Gina Peter Banyard
105c1e9896
tree: use zend_str_has_nul_byte() API ( #19336 )
2025-07-31 23:57:27 +01:00
Gina Peter Banyard
2c4d4a6f18
ext/odbc: various minor refactorings ( #19337 )
2025-07-31 23:56:27 +01:00
Calvin Buckley
18dee43e02
Add SAPI_HEADER_DELETE_PREFIX
, make ext/session use it ( #18678 )
...
* Add SAPI_HEADER_DELETE_PREFIX operation
The session ext currently munges into the linked list of headers
itself, because the delete header API is given the key for headers to
delete. The session ext wants to use a prefix past the colon separator,
for i.e. "Set-Cookie: PHPSESSID=", to eliminate only the specific cookie
rather than all cookies.
This changes the SAPI code to add a new header op to take a prefix
instead. Call sites are yet unchanged. Also fix some whitespace.
* Simplify cookie setting code in ext/session
Use the modern SAPI header ops API, including the remove prefix op we
just added.
* [ci skip] Remove redundant and unnecessary comment
The purpose of this is clear, and after refactoring, the special case is
no longer there, so it has no value.
* Un-deprecate simple add/replace header API, use it
Suggestion from Jakub.
* Restore the optimization removing session cookies had
I don't think this needs to be special cased with the parameter.
* Move setting header length to caller
Suggestion from Jakub.
* [ci skip] adjust tab count
It may be better to use spaces in here instead.
* Use session_cookie_len rather than calling strlen
2025-07-31 19:52:04 -03:00
Ilija Tovilo
a262419398
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix circumvented type check with return by ref + finally
2025-08-01 00:36:38 +02:00
Ilija Tovilo
b3f4863373
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix circumvented type check with return by ref + finally
2025-08-01 00:36:28 +02:00
Ilija Tovilo
d0fad34230
Fix circumvented type check with return by ref + finally
...
Fixes GH-18736
Closes GH-19172
2025-08-01 00:35:48 +02:00
Gina Peter Banyard
65b9cf1db3
ext/standard/proc_open.c: Minor refactorings ( #18085 )
...
Add const modifier
Use unsigned types when the source type is unsigned
Use HashTable instead of zvals where possible
2025-07-31 23:02:35 +01:00
Máté Kocsis
ada10741b4
Add support for manually running the real-time benchmark on PRs ( #19265 )
...
[skip-ci]
2025-07-31 22:51:38 +02:00
Niels Dossche
15990de89e
Refactor op array loops in JIT ( #19335 )
...
Reuse the helper zend_foreach_op_array() that we move to the
zend_optimizer.h header to be usable in opcache.
Note that applying this to other op_array loops is not easy because they either:
- start from EG(persistent_classes_count)
- or only apply to classes
2025-07-31 22:10:06 +02:00
Ilija Tovilo
0afa04a474
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix stale nInternalPosition on rehashing
2025-07-31 21:56:00 +02:00
Ilija Tovilo
5d40592fe2
Fix stale nInternalPosition on rehashing
...
Since GH-13188 we're no longer immediately updating iterator positions when
deleting array elements. zend_hash_rehash() needs to adapt accordingly by
adjusting nInternalPosition for IS_UNDEF elements. This is already the case for
array iterators.
Fixes GH-19280
Closes GH-19323
2025-07-31 21:55:08 +02:00
Alexandre Daubois
e43074a1d8
Rename poorly named tests in Zend/tests
( #19332 )
...
And move some into their relevant folders
2025-07-31 19:58:01 +01:00
Gina Peter Banyard
dad28a30f3
main: pack _php_netstream_data_t and use bool instead of int type ( #19331 )
...
Fix use sites at the same time
2025-07-31 19:56:38 +01:00
Niels Dossche
0591defd6f
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Remove dynamic defs from property hooks
Add missing hooks JIT restart code
2025-07-31 20:22:20 +02:00
Niels Dossche
771bfaf34d
Remove dynamic defs from property hooks
...
Otherwise this hits an assertion failure in pass2 reversal and causes a
subsequent crash.
Closes GH-19206.
2025-07-31 20:22:11 +02:00
Niels Dossche
9ce51dad8b
Add missing hooks JIT restart code
...
Closes GH-19207.
2025-07-31 20:21:40 +02:00
Niels Dossche
cee8ed235a
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-19300: Nested array_multisort invocation with error breaks
2025-07-31 19:01:28 +02:00
Niels Dossche
b82c8ba7fe
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-19300: Nested array_multisort invocation with error breaks
2025-07-31 19:01:13 +02:00
Niels Dossche
a96b05e63f
Fix GH-19300: Nested array_multisort invocation with error breaks
...
There are 2 issues:
1. When a MULTISORT_ABORT happens, it frees func, but func may point to
ARRAYG(multisort_func), which would be a problem with nested
invocations as it can destroy that of the "parent" invocation.
To solve this, delay assigning to the globals.
2. The old globals were not restored which means that nested invocations
with different flags will cause a wrong sorting function to be used.
Closes GH-19319.
2025-07-31 19:00:45 +02:00
Arnaud Le Blanc
659f55a617
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Prevent throwing in running generator
2025-07-31 14:29:25 +02:00
Arnaud Le Blanc
781d77ac54
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Prevent throwing in running generator
2025-07-31 14:29:01 +02:00
Arnaud Le Blanc
6fa8a25a40
Prevent throwing in running generator
...
Generator::throw() on a running generator is not allowed. It throws "Cannot
resume an already running generator" when trying to resume the generator to
handle the provided exception.
However, when calling Generator::throw() on a generator with a non-Generator
delegate, we release the delegate regardless. If a Fiber was suspended in
the delegate, this causes use after frees when the Fiber is resumed.
Fix this by throwing "Cannot resume an already running generator" earlier.
Fixes GH-19326
Closes GH-19327
2025-07-31 14:26:41 +02:00
Gina Peter Banyard
9db21e18ad
main/streams/transports.c: remove useless cast ( #19330 )
...
The function pointer type declaration requires name to be a const char*
2025-07-31 12:44:58 +01:00
Ilija Tovilo
049651dccc
Fix incorrect anonymous class type name assertion ( #19316 )
...
Since GH-17755 self and parent are compile-time resolved. We may now also
encounter this type error at runtime outside of the class itself.
Fixes GH-19304
2025-07-31 13:27:28 +02:00
Remi Collet
bdffded054
Ensure no blacklist configured in test ( #19325 )
2025-07-31 10:38:46 +02:00
Arnaud Le Blanc
37a59e55e8
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Prevent resumption of generator suspended in yield from
2025-07-31 08:47:37 +02:00
Arnaud Le Blanc
a430ee2dd2
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Prevent resumption of generator suspended in yield from
2025-07-31 08:46:06 +02:00
Arnaud Le Blanc
0406a55c92
Prevent resumption of generator suspended in yield from
...
Normally we prevent generators from being resumed while they are already
running, but we failed to do so for generators delegating to non-Generators. As
a result such generator can be resumed, terminated, which causes unexpected
results (crashes) later.
In gh19306.phpt in particular, the generator delegate It::getIterator() suspends
while being called by generator g(). We then resume g(), which throws while
trying to resume It::getIterator(). This causes g() and It::getIterator()
to be released. We then UAF when resuming the Fiber in It::getIterator().
Fix this by ensuring that generators are marked as running while they fetch
the next value from the delegate.
Fixes GH-19306
Closes GH-19315
2025-07-31 08:45:19 +02:00
Jakub Zelenka
e1cf66b6cb
Fix release process feature freeze info ( #19148 )
2025-07-30 23:51:28 +02:00
Daniel Scherzer
0fc62310b1
AllowDynamicProperties: use fully qualified name in validation errors ( #19296 )
2025-07-30 14:50:40 -07:00
Daniel Scherzer
246e8e53ba
[ci skip] Update NEWS to reflect PHP 8.5.0 alpha 4
2025-07-30 13:55:45 -07:00
Niels Dossche
a5219c1ecc
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-19303: Unpacking empty packed array into uninitialized array causes assertion failure
2025-07-30 22:49:08 +02:00
Niels Dossche
a08df32f18
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-19303: Unpacking empty packed array into uninitialized array causes assertion failure
2025-07-30 22:48:59 +02:00
Niels Dossche
5bd5f352e5
Fix GH-19303: Unpacking empty packed array into uninitialized array causes assertion failure
...
Having an empty result array is not a problem, because zend_hash_extend()
will initialize it. Except it does not when the number of elements to add
equals 0, which leaves the array uninitialized and therefore does not
set the packed flag, causing the assertion failure.
Technically, removing the assert would also work and save a check.
On the other hand, this check could also prevent some real work to be
done and should be relatively cheap as we already have to compute the
sum anyway.
Closes GH-19318.
2025-07-30 22:47:11 +02:00
Daniel Scherzer
9999d66bce
ext/standard/tests/file/bug81145.phpt: unlink file before exit ( #19293 )
...
If the test is skipped, the `--SKIPIF--` section exits (via `die()`) without
removing the "bug81145_src.bin" file that gets created, and because the test
was skipped the `--CLEAN--` section is not run, leaving the .bin file behind.
Adjust the `--SKIPIF--` section to remove the .bin file before exiting.
2025-07-30 13:14:10 -07:00
Christoph M. Becker
4754d302bf
Fix #19307 : PGO builds of shared ext-intl are broken
...
We resolve the name mangling issue by including the right header file
inside an `extern "C"` declaration.
Closes GH-19310.
2025-07-30 18:33:40 +02:00
Arnaud Le Blanc
8538e2fe6b
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Prevent operands from being released during comparison
2025-07-30 18:14:45 +02:00
Arnaud Le Blanc
28ed4e6ec0
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Prevent operands from being released during comparison
2025-07-30 18:11:32 +02:00
Arnaud Le Blanc
bc4b6ce7a8
Prevent operands from being released during comparison
...
Fixes GH-19305
Closes GH-19309
2025-07-30 18:09:24 +02:00
Gina Peter Banyard
6600d0e00f
ext/intl: Refactor error handling ( #19196 )
...
This is a comprehensive refactoring of the error mechanism of the Intl extension.
By moving the prefixing of the current method/function being executed to actual error message creation by accessing the execution context, we get the following benefits:
- Accurate error messages indicating *what* call caused the error
- As we *always* "copy" the message, the `copyMsg` arg becomes unused, meaning we can reduce the size of the `intl_error` struct by 4 bytes.
- Saving it as a zend_string means we know the length of the message
- Remove the need to pass around a "function name" `char*` across multiple calls
- Use Intl's exception mechanism to generate exceptions for constructor call
- This removes the need for replacing the error handler
- Which didn't do anything anyway in silent mode, which required throwing non-descriptive exceptions
2025-07-30 16:00:37 +01:00
Ilija Tovilo
03e2613ddd
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix failed assertion with throwing __toString in binary const expr
2025-07-30 13:34:43 +02:00
Ilija Tovilo
138ebf481b
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix failed assertion with throwing __toString in binary const expr
2025-07-30 13:34:32 +02:00
Ilija Tovilo
80022c035b
Fix failed assertion with throwing __toString in binary const expr
...
Solve this with the same pattern as ZEND_AST_GREATER[_EQUAL].
Fixes OSS-Fuzz #434346548
Closes GH-19291
2025-07-30 13:34:01 +02:00
Gina Peter Banyard
7bac9de94a
Zend: refactor zend_call_method_if_exists() API
...
The objective of this is to stop relying on the fci.function_name zval field,
to see if in the future we can get rid of said field and fit an FCI/FCC pair in a single cache line
2025-07-30 12:02:41 +01:00
Gina Peter Banyard
fc6c49cbf4
ext/zend_test: Test zend_call_method_if_exists()
2025-07-30 12:02:41 +01:00
Remi Collet
a9f3e3c44e
Fix GH-19298 missing libraries for opcache
...
In the absence of `PHP_ARG_WITH([opcache],` the value of ext_shared is not
initialized while processing directives of ext/opcache/config.m4, causing
PHP_EVAL_LIBLINE() to add libs to OPCACHE_SHARED_LIBADD instead of LIBS.
Closes GH-19301
2025-07-30 11:15:45 +02:00
Niels Dossche
16b2fc41a3
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Reset global pointers to prevent use-after-free
2025-07-30 09:23:38 +02:00
Niels Dossche
6fda0a5617
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Reset global pointers to prevent use-after-free
2025-07-30 09:23:33 +02:00
Niels Dossche
be9f1d3d56
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Reset global pointers to prevent use-after-free
2025-07-30 09:23:12 +02:00
Niels Dossche
7016ad558b
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Reset global pointers to prevent use-after-free
2025-07-30 09:22:50 +02:00
Florian Engelhardt
3aaa8d3526
Reset global pointers to prevent use-after-free
...
Closes GH-19212.
2025-07-30 09:22:15 +02:00
Niels Dossche
bc2d02e3a9
Fix fuzzer after opcache became mandatory ( #19292 )
2025-07-30 09:01:10 +02:00
Daniel Scherzer
c1b129bd18
[ci skip] Update NEWS for PHP 8.5.0 beta1
2025-07-29 13:59:19 -07:00
Gina Peter Banyard
a95a81000d
Zend: Exception::__toString() no need to allocate the method name
...
We can create the FCI/FCC pair ourself outside of the loop as the method getTraceAsString is final
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2025-07-29 21:16:13 +01:00
Gina Peter Banyard
c9e91bfbab
Zend/zend_exceptions: Add const modifiers
2025-07-29 21:16:13 +01:00
David CARLIER
abee5c138f
ext/intl: convert C part to C++ step 1. ( #19231 )
2025-07-29 20:22:19 +01:00
Bogdan Ungureanu
e8b5bcfe19
Intl: IntlListFormatter - update exception message ( #19282 )
2025-07-29 08:35:27 -07:00
Niels Dossche
4c576a2b02
Fix exception handling in shm_put_var() ( #19279 )
2025-07-29 17:31:06 +02:00
Daniel Scherzer
ec0ec47bbf
NEWS: move a misplaced comma [skip ci]
2025-07-29 08:13:33 -07:00
Daniel Scherzer
61415942c2
ext/standard: drop old smart_string headers ( #19233 )
...
Functionality was removed in PHP 7.2
2025-07-29 07:57:19 -07:00
Daniel Scherzer
d23e4ba538
UPGRADING.INTERNALS: document ZEND_DECLARE_ATTRIBUTED_CONST ( #19270 )
...
[skip ci]
2025-07-29 07:55:39 -07:00
Daniel Scherzer
54863f4930
gen_stub: Update PHP-Parser to 5.6.0 ( #19271 )
...
Includes support for declaring functions named `clone`, so update the stub file
where `clone` is declared to remove the `_clone` workaround.
2025-07-29 07:47:58 -07:00
Arnaud Le Blanc
712508fdb2
Call php_child_init() after fork during preloading ( #19287 )
2025-07-29 16:10:35 +02:00
Jakub Zelenka
ce6e7a2786
Integrate OpenSSL libctx to pwhash ( #19236 )
...
This allows using OpenSSL Argon2 password hashing on ZTS.
Closes GH-19236
2025-07-29 15:06:34 +02:00
David Carlier
f72105be81
ext/posix: value ranges check for posix_setrlimit and posix_setpgid
...
setpgid accepts values from 0 to "PID_MAX".
for setrlimit the culprit is using zend_long to represent rlim_t
but at least we accept -1 for RLIM_INFINITY, however rl_cur should
not be greater than rl_max value.
close GH-19281
2025-07-29 13:10:26 +01:00
Arnaud Le Blanc
c561f7da85
Refresh zend_mm shadow key on fork
...
The shadow key is refreshed when resetting the memory manager between two
requests. But in forking SAPIs the first request of a child process inherits the
shadow key of the parent. As a result, a leak of the shadow key during the first
request of one process gives away the shadow key used during the first request
of other processes. This makes the key refresh mechanism less useful.
Here I ensure that we refresh the shadow key after a fork. We can not reset the
manager as there may be active allocations. Instead, we have to recompute shadow
pointers with the new key.
Closes GH-16765
2025-07-29 14:00:37 +02:00
Arnaud Le Blanc
8e38f6d1c6
Fix out of tree builds ( #19283 )
2025-07-29 13:36:30 +02:00
Jakub Zelenka
cecf9b02e5
Remove unused FPM_LOG_BUFFER
2025-07-29 11:43:57 +02:00
Jakub Zelenka
cfb3e98c84
FPM: Implement configurable access log limit
...
It sets the access log limit as configurable log_limit to allow larger
log limit than the currently fixed limit of 1024 characters.
Fixes GH-12302
Closes GH-18725
2025-07-29 11:32:01 +02:00
Ilija Tovilo
35a4656a59
Fix error recording with file cache only (GH-19278)
...
Introduced by GH-18541.
This path is hit when compilation fails with a compile error, rather than
bailout. If a non-fatal error is recorded, it will not be emitted nor freed.
Handle accordingly.
2025-07-29 10:06:43 +02:00
Máté Kocsis
e48099a03c
Update real-time benchmark config after opcache became mandatory
...
https://wiki.php.net/rfc/make_opcache_required removed the --enable-opcache option, and this change creates a problem for the benchmark: the master branch (containing the RFC implementation) cannot use the deprecated options and config anymore, while earlier versions must still use them.
Therefore, the benchmark had to introduce the PHP_OPCACHE=2 config value (3455b34856
) to signal that opcache still has to be manually enabled. After the next benchmark run, PHP_OPCACHE for the previous PHP version has to be switched back to "1".
[skip-ci]
2025-07-29 00:16:37 +02:00
Gina Peter Banyard
b30ccf9158
Merge branch 'PHP-8.4'
...
* PHP-8.4:
ext/intl: Fix return value on failure for resourcebundle count handler
2025-07-28 15:36:44 +01:00
Gina Peter Banyard
5295fc07d5
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
ext/intl: Fix return value on failure for resourcebundle count handler
2025-07-28 15:36:02 +01:00
Gina Peter Banyard
6b0a80903b
ext/intl: Fix return value on failure for resourcebundle count handler
...
Closes GH-19277
2025-07-28 15:35:31 +01:00
Gina Peter Banyard
f63a35d944
ext/sysvmsg: various minor refactorings
2025-07-28 15:33:22 +01:00
Gina Peter Banyard
87d83d162d
ext/sysvsem: use bool type instead of int
2025-07-28 15:33:22 +01:00
Gina Peter Banyard
bac158c80d
ext/sysvshm: use size_t and ssize_t instead of zend_long
2025-07-28 15:33:22 +01:00
Gina Peter Banyard
6154fac64d
ext/sysvshm: refactor php_put_shm_data()
2025-07-28 15:33:22 +01:00
Gina Peter Banyard
4844c7a92f
ext/sysvshm: voidify php_remove_shm_data()
2025-07-28 15:33:22 +01:00
Gina Peter Banyard
e897621be9
ext/sysvshm: shm_detach() always returns true
2025-07-28 15:33:22 +01:00
David Carlier
3b4f2b0798
ext/posix: posix_kill() process_id range check.
...
pid_t is, for the most part, represented by a signed int, by overflowing
it, we end up being in the -1 case which affect all accessible processes.
close GH-18944
2025-07-28 15:31:14 +01:00
Gina Peter Banyard
eaf24ba4e2
Merge branch 'PHP-8.4'
...
* PHP-8.4:
ext/gd: Fix comparison with result of php_stream_can_cast()
2025-07-28 11:55:43 +01:00
Gina Peter Banyard
19c84e2687
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
ext/gd: Fix comparison with result of php_stream_can_cast()
2025-07-28 11:55:14 +01:00
Gina Peter Banyard
83b8d2c290
ext/gd: Fix comparison with result of php_stream_can_cast()
...
Closes GH-19107
2025-07-28 11:54:19 +01:00
Gina Peter Banyard
b75c2dcb02
Remove myself from bcmath codeowner
...
I haven't kept up with the extension nor been doing proper reviews for it
2025-07-28 11:22:22 +01:00
Dmitrii Derepko
5947fedbbd
ext/standard: handle html entities empty string before processing ( #19220 )
2025-07-28 12:15:26 +02:00
Daniel Scherzer
ff810d5e36
Arginfo: reuse zend_string objects for initializing attribute values ( #19241 )
...
Avoid initializing the same string content multiple times and make use of the
fact that the strings created to initialize attribute values are not freed by
simply making use of an existing zend_string with the same content if one is
available.
2025-07-27 17:27:22 -07:00
David CARLIER
068aaed196
ext/sockets: using accept4 wheneever possible for php_accept_connect helper ( #19268 )
...
Haiku now supports it as well now, so we can simplify the workflow a bit for those platforms.
2025-07-27 20:52:11 +01:00
Gina Peter Banyard
191290e194
ext/intl: Split error tests out and stop relying on ut_common() testing ( #19266 )
2025-07-27 19:40:42 +01:00
David CARLIER
4a0ad9bd91
ext/sockets: cmsg data array elements using uint32_t type instead. ( #19254 )
2025-07-27 15:43:59 +01:00
Niels Dossche
63e40b1b29
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix bug #51558 : shared readline build fails (#15242 )
2025-07-27 15:34:30 +02:00
Niels Dossche
3da9478d78
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix bug #51558 : shared readline build fails (#15242 )
2025-07-27 15:34:23 +02:00
Peter Kokot
17df11e3f7
Fix bug #51558 : shared readline build fails ( #15242 )
...
The 'rl_pending_input' is a variable in Readline library and checking it
with PHP_CHECK_LIBRARY wouldn't find it on some systems.
Library check works on most systems but not on the mentioned AIX in the
bug as it exports variables and functions differently whereas the linker
couldn't resolve the variable as a function.
This should fix the build on systems where this caused issues, such as
AIX.
The <readline/readline.h> is not self-contained header and needs to also
have <stdio.h> included before to have FILE type available. This fixes
the issue on unpatched default readline installations, such as macOS.
Checking this variable ensures that the found library is the correct
library and also that it is of minimum version needed by current PHP
code (https://bugs.php.net/48608 ).
The library check:
```c
| char rl_pending_input ();
| int main (void) {
| return rl_pending_input ();
| }
```
The declaration check:
```c
| #include <stdio.h>
| #include <readline/readline.h>
| int main (void) {
| #ifndef rl_pending_input
| #ifdef __cplusplus
| (void) rl_pending_input;
| #else
| (void) rl_pending_input;
| #endif
| #endif
| ;
| return 0;
| }
```
Closes https://bugs.php.net/51558
Closes GH-19259.
2025-07-27 15:33:48 +02:00
David Carlier
f4ad6ea287
Merge branch 'PHP-8.4'
2025-07-27 13:50:30 +01:00
David Carlier
87b4030503
Merge branch 'PHP-8.3' into PHP-8.4
2025-07-27 13:50:21 +01:00
David Carlier
e1c4a0ae51
Fixed GH-19261: msgfmt_parse_message leaks on message format failure.
...
close GH-19262
2025-07-27 13:49:24 +01:00
David Carlier
f7ca8138e7
Merge branch 'PHP-8.4'
2025-07-27 12:56:05 +01:00
David Carlier
279589c3af
Merge branch 'PHP-8.3' into PHP-8.4
2025-07-27 12:55:17 +01:00
dixyes
e16df981bf
ext/pdo_pgsql: Fix _pdo_pgsql_trim_message bad access
...
close GH-19239
2025-07-27 12:54:43 +01:00
Arnaud Le Blanc
7b3e68ff69
Fix error handling inconsistency with opcache
...
When opcache is enabled, error handling is altered in the following ways:
* Errors emitted during compilation bypass the user-defined error handler
* Exceptions emitted during class linking are turned into fatal errors
Changes here make the behavior consistent regardless of opcache being enabled or
not:
* Errors emitted during compilation and class linking are always delayed and
handled after compilation or class linking. During handling, user-defined
error handlers are not bypassed. Fatal errors emitted during compilation or
class linking cause any delayed errors to be handled immediately (without
calling user-defined error handlers, as it would be unsafe).
* Exceptions thrown by user-defined error handlers when handling class linking
error are not promoted to fatal errors anymore and do not prevent linking.
Fixes GH-17422.
Closes GH-18541.
Closes GH-17627.
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2025-07-27 11:01:49 +02:00
Niels Dossche
9b777b3c35
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Free opened_path when opened_path_len >= MAXPATHLEN
2025-07-27 10:54:53 +02:00
Niels Dossche
1c74a1a889
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Free opened_path when opened_path_len >= MAXPATHLEN
2025-07-27 10:54:46 +02:00
dixyes
5dd965117a
Free opened_path when opened_path_len >= MAXPATHLEN
...
Closes GH-19240.
2025-07-27 10:54:21 +02:00
Tim Düsterhus
d3ebf97d77
Fix expectations in version string tests
2025-07-27 09:40:23 +02:00
Arnaud Le Blanc
7b4c14dc10
Make OPcache non-optional
...
This removes the --enable-opcache/--disable-opcache configure switch. OPcache
is now always builtin. The default value of opcache.enable and
opcache.enable_cli is unchanged.
RFC: https://wiki.php.net/rfc/make_opcache_required
Closes GH-18961.
Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
2025-07-27 09:40:22 +02:00
Ayesh Karunaratne
6f3bc59950
ext/curl: Add CURLOPT_SSL_SIGNATURE_ALGORITHMS
option
...
Adds support for `CURLOPT_SSL_SIGNATURE_ALGORITHMS`[^1], supported
since Curl version 8.14.0.
[^1]: https://curl.se/libcurl/c/CURLOPT_SSL_SIGNATURE_ALGORITHMS.html
Closes GH-18692
2025-07-26 20:17:05 +02:00
Arnaud Le Blanc
73b1ebfa20
Fix linker failure when building Opcache statically
...
We use linker relocations to fetch the TLS index and offset of _tsrm_ls_cache.
When building Opcache statically, linkers may attempt to optimize that into a
more efficient code sequence (relaxing from "General Dynamic" to "Local Exec"
model [1]). Unfortunately, linkers will fail, rather than ignore our
relocations, when they don't recognize the exact code sequence they are
expecting.
This results in errors as reported by GH-15074:
TLS transition from R_X86_64_TLSGD to R_X86_64_GOTTPOFF against
`_tsrm_ls_cache' at 0x12fc3 in section `.text' failed"
Here I take a different approach:
* Emit the exact full code sequence expected by linkers
* Extract the TLS index/offset by inspecting the linked ASM code, rather than
executing it (execution would give us the thread-local address).
* We detect when the code was relaxed, in which case we can extract the TCB
offset instead.
* This is done in a conservative way so that if the linker did something we
didn't expect, we fallback to a safer (but slower) mechanism.
One additional benefit of that is we are now able to use the Local Exec model in
more cases, in JIT'ed code. This makes non-glibc builds faster in these cases.
Closes GH-18939.
Related RFC: https://wiki.php.net/rfc/make_opcache_required .
[1] https://www.akkadia.org/drepper/tls.pdf
2025-07-26 16:43:41 +02:00
Arnaud Le Blanc
04feb452ba
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Add unique entry point for extra tests
2025-07-26 16:17:51 +02:00
Arnaud Le Blanc
120a5ebb66
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Add unique entry point for extra tests
2025-07-26 16:17:40 +02:00
Arnaud Le Blanc
a7cdf0b172
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Add unique entry point for extra tests
2025-07-26 16:15:48 +02:00
Arnaud Le Blanc
5fa27e25b3
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Add unique entry point for extra tests
2025-07-26 16:14:56 +02:00
Arnaud Le Blanc
b633720585
Add unique entry point for extra tests
...
We are adding extra (non-phpt) test suites in [1] and [2]. In order to
avoid touching CI files too often (which are maintained in 8.1 and merged in
upper branches), we add a single entry point to call the extra tests. The entry
point can be updated in branches without synchronizing all the way from 8.1.
CI files still need to be touched to install dependencies of these tests,
but this should be manageable as these do not change often and are the same
in every branch.
Closes GH-19242.
[1] https://github.com/php/php-src/pull/16987
[2] https://github.com/php/php-src/pull/18939
2025-07-26 16:13:34 +02:00
Arnaud Le Blanc
7f7b3cdb90
Introduce zend_vm_opcode_handler_t / zend_vm_opcode_handler_func_t
...
This reduces the chances of confusion between opcode handlers used by the
VM, and opcode handler functions used for tracing or debugging. Depending
on the VM, zend_vm_opcode_handler_t may not be a function. For instance in
the HYBRID VM this is a label pointer.
Closes GH-19006
2025-07-26 13:20:59 +02:00
Daniel Scherzer
747ecce51f
gen_stub: simplify ClassInfo::getRegistration()
2025-07-25 11:17:34 -07:00
Daniel Scherzer
74f7ecbe04
gen_stub: add ConstInfo::getPredefinedConstantElement()
...
Simplifies the implementation of `::getPredefinedConstantTerm()` and
`::getPredefinedConstantEntry()`, which only differ in the name of the tag
used.
2025-07-25 11:17:34 -07:00
Daniel Scherzer
5ae87ffef4
gen_stub: avoid unneeded regex match
2025-07-25 11:17:34 -07:00
Daniel Scherzer
ecc403a8fa
gen_stub: inline computeStubHash()
2025-07-25 11:17:34 -07:00
Daniel Scherzer
2ed5472f06
gen_stub: make some FuncInfo
methods private
...
* `FuncInfo::isFinalMethod()`
* `FuncInfo::getModifierNames()`
* `FuncInfo::equalsApartFromNameAndRefcount()`
2025-07-25 11:17:34 -07:00
Daniel Scherzer
0b01640b58
gen_stub: replace FunctionOrMethodName::isMethod()
with instanceof
2025-07-25 11:17:34 -07:00
Daniel Scherzer
49f1685cde
gen_stub: simplify FuncInfo::getFramelessDeclaration()
2025-07-25 11:17:34 -07:00
Daniel Scherzer
988da4c951
gen_stub: simplify FuncInfo::getFunctionEntry()
2025-07-25 11:17:34 -07:00
Daniel Scherzer
9dfee95dae
gen_stub: add SimpleType::toTypeInfo()
...
Simplifies the implementation of `::toTypeCode()` and `::toTypeMask()` by
combining the `switch` blocks.
2025-07-25 11:17:34 -07:00
Daniel Scherzer
e5d4d656ab
gen_stub: replace AbstractConstName::isClassConst()
with instanceof
2025-07-25 11:17:34 -07:00
Daniel Scherzer
8bd8223bad
gen_stub: remove unused AbstractConstName::equals()
2025-07-25 11:17:34 -07:00
Daniel Scherzer
15547a2eb1
gen_stub: simplify generateFunctionEntries()
2025-07-25 11:17:34 -07:00
Daniel Scherzer
30c8480a39
gen_stub: move getFileDocComments()
into FileInfo
...
Reduce the number of global functions by moving it to static method
`FileInfo::getFileDocComments()`. Since it is only used by
`FileInfo::parseStubFile()`, also make it private.
2025-07-25 11:17:34 -07:00
Daniel Scherzer
24d94197fd
gen_stub: move generateClassEntryCode()
into FileInfo
...
Reduce the number of global functions by moving it to instance method
`FileInfo::generateClassEntryCode()`.
2025-07-25 11:17:34 -07:00
Daniel Scherzer
0d221c5b70
gen_stub: create VersionFlags
class
...
This new class holds the logic for applying different flags based on the PHP
version, and replaces `VariableLike::addFlagForVersionsAbove()` (use
`VersionFlags::addForVersionsAbove()`) and `generateVersionDependentFlagCode()`
(use `VersionFlags::generateVersionDependentFlagCode()`).
2025-07-25 11:17:34 -07:00
Daniel Scherzer
1218e39b07
gen_stub: add maximum option to generateVersionDependentFlagCode()
...
In preparation for moving this logic to a dedicated class, add support for a
maximum version of PHP in the generation of version-dependent flags. This
replaces the manual logic in `FuncInfo::getFunctionEntry()` to split up the
flags that are used when PHP 8.4 is not supported.
2025-07-25 11:17:34 -07:00
Tim Düsterhus
a2d8ee27f2
opcache: Disallow changing opcache.memory_consumption
when SHM is set up ( #19146 )
...
* opcache: Reset `accel_startup_ok` after shutting down
This is necessary for phpdbg, which runs multiple startup/shutdown cycles in
the same process.
* opcache: Disallow changing `opcache.memory_consumption` when SHM is set up
Normally changing the INI value is not possible after SHM is set up, since it
is `PHP_INI_SYSTEM`. FPM is a notable exception: SHM is set up in the master
process, but when spawning the individual pools, the `php_admin_value` config
option can be used to change `PHP_INI_SYSTEM` INIs on a per-pool basis. This
does not work for this option, since it will only be read on early start,
leading to misleading PHPInfo output, since the INI value appears to be
successfully set and since some of the calculated values are derived from the
INI value rather than the actual value.
2025-07-25 18:36:47 +02:00
Daniel Scherzer
b428bc934a
ext/reflection: voidify format_default_value()
( #19234 )
...
This function always returned SUCCESS unconditionally; removing the return type
revealed some impossible code for handling FAILURE that could also be removed.
2025-07-25 09:04:28 -07:00
Marc Bennewitz
7c1e461032
Removed unused var exec_time and fetch time in opcache/zend_accelerator_module.c (GH-19235)
2025-07-25 13:22:03 +02:00
Jakub Zelenka
b1fce8a98c
Add digest algo param to public encrypt and private decrypt
...
Specifically, it is added to openssl_public_encrypt() and
openssl_private_decrypt() functions. The purpose is to specify digest
algorithm for OEAP padding. It currently defaults to SHA1 for some
OpenSSL versions which is not preferred for modern setup and causes
problems in compatibility with web crypto.
Closes GH-19223
2025-07-25 12:56:47 +02:00
Niels Dossche
93b9808004
Merge branch 'PHP-8.4'
...
* PHP-8.4:
NEWS for hrtime in FTP and standard
Handle broken hrtime in ftp
Fix arginfo/zpp violation if zend_hrtime is not available
2025-07-25 12:05:17 +02:00
Niels Dossche
802e348b49
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
NEWS for hrtime in FTP and standard
Handle broken hrtime in ftp
Fix arginfo/zpp violation if zend_hrtime is not available
2025-07-25 12:05:12 +02:00
Niels Dossche
f94c11fff8
NEWS for hrtime in FTP and standard
2025-07-25 12:04:40 +02:00
Niels Dossche
beeeee2978
Handle broken hrtime in ftp
...
Part of GH-19210.
Closes GH-19219.
2025-07-25 11:56:30 +02:00
Niels Dossche
ad2143f3b0
Fix arginfo/zpp violation if zend_hrtime is not available
...
Part of GH-19210.
Closes GH-19218.
2025-07-25 11:56:17 +02:00
DanielEScherzer
7777eaa8e1
zend_compile.h: align ZEND_CLASS_CONST_IS_CASE
like others [skip ci]
2025-07-24 15:07:27 -07:00
Jorg Adam Sowa
da7d2e14ac
Add macos 15 to push GH action (GH-18514)
...
* Replaced macos14 with macos15 in push
* skip lc_ctype_inheritance test for macOS
2025-07-24 15:02:06 +02:00
Florian Engelhardt
29b38a1ced
Fix GH-19226: Segfault when spawning new thread in soap extension
...
Closes GH-19228.
2025-07-24 11:56:43 +02:00
David CARLIER
2645663d9b
ext/intl: GregorianCalendar using C++ upcasting operator. ( #19216 )
...
when fetching the internal ICU object also removing one useless cast.
2025-07-23 12:25:20 +01:00
Niels Dossche
719419a6e5
Fix unterminated string GCC warnings in mbstring ( #19192 )
...
Necessary for for Werror builds
2025-07-23 11:49:16 +02:00
Alexandre Daubois
d292968f7c
Add ReflectionProperty::getMangledName()
( #18980 )
2025-07-22 12:24:27 -07:00
DanielEScherzer
745e81bfd0
UPGRADING: clean up a few entries [skip ci] ( #19204 )
...
Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
2025-07-22 10:12:23 -07:00
Ilija Tovilo
aba6b89399
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Coerce numeric string keys from iterators when argument unpacking
2025-07-22 17:48:06 +02:00
Ilija Tovilo
4bc5aa3531
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Coerce numeric string keys from iterators when argument unpacking
2025-07-22 17:47:56 +02:00
Bob Weinand
5b8ee009d6
Merge branch 'PHP-8.4' of https://github.com/php/php-src
2025-07-22 17:47:20 +02:00
Ilija Tovilo
23ec35bf4a
Coerce numeric string keys from iterators when argument unpacking
...
Fixes GH-18581
Closes GH-19151
2025-07-22 17:46:34 +02:00
Bob Weinand
b13347be38
Fix GH-19044: Protected properties are not scoped according to their prototype ( #19046 )
...
* Fix GH-19044: Protected properties are not scoped according to their prototype
* Adjust after review
* Simplify to using prototype even for asymmetric visibility
2025-07-22 17:46:14 +02:00
Ilija Tovilo
5a06842bf8
Fix '?' in ReflectionNamedType::getName() from ReflectionProperty::getSettableType()
...
Fixes GH-19187
Closes GH-19201
2025-07-22 15:57:15 +02:00
Niels Dossche
441e55790f
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Run FreebSD CI under 13.5
2025-07-22 15:52:45 +02:00
Niels Dossche
4e1d3f8772
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Run FreebSD CI under 13.5
2025-07-22 15:52:38 +02:00
Niels Dossche
7efbb2e4e0
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Run FreebSD CI under 13.5
2025-07-22 15:52:29 +02:00
Niels Dossche
d9d412645d
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Run FreebSD CI under 13.5
2025-07-22 15:52:16 +02:00
Niels Dossche
be88192594
Run FreebSD CI under 13.5
...
13.3 gives a 404 now.
Also pulls in a 8.4 fix to include xxhash from the bundled location.
Closes GH-19213.
2025-07-22 15:51:19 +02:00
Ilija Tovilo
99b5b20479
Merge branch 'PHP-8.4'
...
* PHP-8.4:
[skip ci] Fix wrong oss-fuzz ID
2025-07-22 15:46:51 +02:00
Ilija Tovilo
79368ed8f3
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
[skip ci] Fix wrong oss-fuzz ID
2025-07-22 15:46:44 +02:00
Ilija Tovilo
a48d620c26
[skip ci] Fix wrong oss-fuzz ID
...
Oops, darn copy & paste.
2025-07-22 15:45:48 +02:00
Ilija Tovilo
5b05d429f2
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Leak in failed unserialize() with opcache
2025-07-22 15:44:24 +02:00
Ilija Tovilo
f0baf3dc11
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Leak in failed unserialize() with opcache
2025-07-22 15:44:16 +02:00
Ilija Tovilo
5d1636e40b
Leak in failed unserialize() with opcache
...
With opcache, zend_string_init_interned() will allocate non-interned strings at
runtime because shm is locked. Hence, we need to make sure to actually free this
string.
Fixes OSS-Fuzz #433303828
Closes GH-19211
2025-07-22 15:43:31 +02:00
Niels Dossche
ef5ca80a47
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Add missing cc clobber
2025-07-22 12:43:57 +02:00
Niels Dossche
c04f2d2d88
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Add missing cc clobber
2025-07-22 12:43:21 +02:00
Niels Dossche
13c781f04d
Add missing cc clobber
...
Closes GH-19205.
2025-07-22 12:43:08 +02:00
David CARLIER
a7fef37657
ext/intl: c++ memory management application to timezone class internals. ( #19184 )
2025-07-22 05:35:44 +01:00
Niels Dossche
113eb203b0
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix test conflict between chmod_variation2 and file_variation5
2025-07-21 23:57:55 +02:00
Niels Dossche
e572e899bd
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix test conflict between chmod_variation2 and file_variation5
2025-07-21 23:57:49 +02:00
Niels Dossche
7ab37e81e0
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix test conflict between chmod_variation2 and file_variation5
2025-07-21 23:57:42 +02:00
Niels Dossche
27f24bd9bc
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix test conflict between chmod_variation2 and file_variation5
2025-07-21 23:57:34 +02:00
Niels Dossche
605ee05491
Fix test conflict between chmod_variation2 and file_variation5
...
Both used "somelink".
See 4642146137
Closes GH-19208.
2025-07-21 23:57:21 +02:00
Niels Dossche
95f1350ca8
NEWS and UPGRADING for array_chunk
2025-07-21 23:00:44 +02:00
Niels Dossche
1b169bf28e
Allocate array eagerly in array_chunk
...
By preallocating it as a packed array, we save the initial
initialization overhead.
Gives a few extra percentage points improvement.
2025-07-21 22:59:55 +02:00
Niels Dossche
4762d46427
Avoid modulo operation in loop in array_chunk
...
For this benchmark:
```php
$length = 25;
for ($i=0;$i<1000;$i++)
array_chunk(range(0, 10000), $length);
```
On an i7-4790, length=25 speeds up by 1.8x and length=1 by 1.27x.
On an i7-1185G7, length=25 speeds up by 1.08x and length=1 by 1.02x.
2025-07-21 22:59:55 +02:00
DanielEScherzer
1eadf553f1
Arginfo: avoid using temporary zvals for initializing attribute values ( #19141 )
...
Instead of
* adding a zval on the stack
* initializing it
* copying the value to the attribute
Just initialize the value directly in the zend_attribute_arg
2025-07-21 13:33:51 -07:00
Niels Dossche
c55f142c6c
Make specialization of x64 zend_safe_address() for nmemb==1 ( #19203 )
2025-07-21 22:13:46 +02:00
Artem Ukrainskiy
e0c3f46496
Refactor traverse_for_entities for unescape_html_entities
...
Optimize scanning for '&' and ';' using memchr. Use memcpy instead of
character-by-character copying language.
Closes GH-18092
2025-07-21 20:57:09 +02:00
Ilija Tovilo
eb65ec41b7
Implement Closure::getCurrent() to retrieve current closure
...
Fixes GH-18163
Closes GH-18167
2025-07-21 16:07:49 +02:00
Ilija Tovilo
d20f4fca69
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix properties_info_table for abstract properties
2025-07-21 15:54:53 +02:00
Ilija Tovilo
c8cc23336d
Fix properties_info_table for abstract properties
...
Fixes GH-19053
Closes GH-19140
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
2025-07-21 15:54:24 +02:00
David Carlier
ff6c1c7a30
[ci kip] UPDATE NEWS
2025-07-21 12:30:52 +01:00
David CARLIER
bd886d21e7
Fix GH-19197: session build fails on system with memcpy as macro. ( #19198 )
...
Thus ZEND_STRL macro does not expand as expected so going back
to not using it like lower branches.
2025-07-21 10:19:29 +01:00
Niels Dossche
30f03021d1
[ci skip] Remove obsolete todo ( #19195 )
...
All arguments are documented on php.net, although result_type is called
mode in the docs and stub.
2025-07-21 10:57:54 +02:00
Tim Düsterhus
7f1b3606a8
main: Add PHP_BUILD_PROVIDER
userland constant ( #19157 )
...
This constant can be handy for tools like PIE to determine the origin of a PHP
binary to provide better output / diagnostics.
see php/pie#275
see php/php-src#18168
2025-07-21 10:43:14 +02:00
David CARLIER
e91d2c719f
zend: ZEND_NONSTRING for clang >= 20 support ( #19193 )
2025-07-20 22:27:06 +01:00
Niels Dossche
d7f9caf37c
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-18640: heap-use-after-free ext/soap/php_encoding.c:299:32 in soap_check_zval_ref
2025-07-20 19:50:01 +02:00
Niels Dossche
f8196a5db5
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-18640: heap-use-after-free ext/soap/php_encoding.c:299:32 in soap_check_zval_ref
2025-07-20 19:49:56 +02:00
Niels Dossche
6cc4ae1f1d
Fix GH-18640: heap-use-after-free ext/soap/php_encoding.c:299:32 in soap_check_zval_ref
...
For attributes, relying on the ref_map doesn't make sense the first
place as you can't really refer to attributes from attributes.
The code therefore assumes that the node is unique, which is broken.
Closes GH-19181.
2025-07-20 19:49:22 +02:00
Niels Dossche
541620cf78
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-19098: libxml<2.13 segmentation fault caused by php_libxml_node_free
2025-07-20 17:20:53 +02:00
Niels Dossche
cb73155945
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-19098: libxml<2.13 segmentation fault caused by php_libxml_node_free
2025-07-20 17:20:47 +02:00
Niels Dossche
312869381a
Fix GH-19098: libxml<2.13 segmentation fault caused by php_libxml_node_free
...
This implements a workaround for reconciliation not being performed for
document-less nodes in libxml<2.13.
Closes GH-19186.
2025-07-20 17:19:43 +02:00
David CARLIER
999d29dc2b
ext/intl: reducing raw pointer usage in C++ part, using smart ones instead. ( #19179 )
2025-07-20 12:16:04 +01:00
Niels Dossche
726516b8c1
UPGRADING, UPGRADING.INTERNALS, and NEWS for SVG and extensible image API
2025-07-20 12:53:57 +02:00
Niels Dossche
0962c325fa
Implement SVG image handler
...
This implements an SVG handler using the libxml reader API. This does
not parse the entire document but instead uses a pull parser to locate
the root element, check whether it's an svg root, do some extra sanity
checks on the attribute, and fill in the php_gfxinfo structure.
2025-07-20 12:53:57 +02:00
Niels Dossche
8db883c540
Add API to register custom image handlers
...
This is modelled similarly to the password registry API.
We have an array to which new handlers can be added, and when a built-in
handler cannot handle the image, we try the handlers in the array.
The standard module is in control of registering a new constant for the
image file type so that no clashes can occur. It also updates the image
file type count constant. As such, the registration may only happen
during module startup.
2025-07-20 12:53:57 +02:00
Niels Dossche
05bb051243
Expose gfxinfo as php_gfxinfo
...
This is necessary for future commits, when we extend the image handling
to support extensions adding their own handlers.
Also extend the struct with fields for when the width and height are not
numbers but strings (e.g. for SVG).
2025-07-20 12:53:57 +02:00
Niels Dossche
03a9f03822
Migrate from xmlNewNode to xmlNewDocNode ( #19182 )
...
The former is discouraged [1].
[1] https://gnome.pages.gitlab.gnome.org/libxml2/html/tree_8h.html#aa39c05fb472571ed00e38c065e67d2ec
2025-07-19 23:29:04 +02:00
Peter Kokot
68fdb43573
Remove duplicate libxml2-dev ( #19185 )
2025-07-19 20:33:37 +02:00
Benstone Zhang
dfac2da7fb
Add support for HEIF/HEIC to getimagesize
...
Signed-off-by: Benstone Zhang <benstonezhang@gmail.com>
2025-07-19 19:24:45 +02:00
Niels Dossche
dd3a098a9b
Disable error handler in fuzzer ( #19183 )
...
These are all the same root cause and it's known.
2025-07-19 13:08:21 +02:00
Volker Dusch
189b933dd4
RM docs: Update social media annoncement process ( #19159 )
2025-07-19 01:18:39 +02:00
Tim Düsterhus
6ca6d569ff
bless_tests: Replace the object ID in var_dump()
for namespaced classes ( #19174 )
2025-07-18 20:43:23 +02:00
David Carlier
2c42479890
Merge branch 'PHP-8.4'
2025-07-18 18:02:46 +01:00
David Carlier
f1a77c0198
Merge branch 'PHP-8.3' into PHP-8.4
2025-07-18 18:02:02 +01:00
Petr Sumbera
be09985c87
Fix GH-19169: ZEND_STATIC_ASSERT for -std=c++17
...
needs to define ZEND_STATIC_ASSERT to appropriate C++ static_assert
instead of the C version.
2025-07-18 18:00:24 +01:00
Gina Peter Banyard
b48faee850
ext/snmp: no need to use a smart_string for error message ( #19171 )
2025-07-18 16:43:39 +01:00
Tim Düsterhus
5fdc02282f
uri: Improve exceptions for Uri\Rfc3986\Uri
( #19161 )
...
* uri: Streamline implementation of `uriparser_parse_uri_ex()`
Avoid the use of a macro and streamline the logic.
* uri: Improve exceptions for `Uri\Rfc3986\Uri`
* uri: Allow empty URIs for RFC3986
* NEWS
* uri: Improve ext/uri/tests/004.phpt for empty URIs
2025-07-18 17:38:44 +02:00
David CARLIER
063d795599
ext/intl: using a bit more modern c++ memory management features. ( #19163 )
...
not always possible (e.g. PHP objects) but when scoped we can manage
here to simplify memory managament starting with IntlDateFormat.
2025-07-18 14:10:40 +01:00
Gina Peter Banyard
419f6750c0
ext/tidy: refactor php_tidy_file_to_mem()
...
Pass zend_string* along
2025-07-18 13:21:56 +01:00
Gina Peter Banyard
4433986e40
ext/tidy: Refactor php_tidy_parse_string()
2025-07-18 13:21:56 +01:00
Gina Peter Banyard
0a130caf58
ext/tidy: refactor php_tidy_set_tidy_opt()
...
Bring closer to unique call site and return value of it
2025-07-18 13:21:56 +01:00
Gina Peter Banyard
01dbee83e1
ext/tidy: tidyOptGetType returns an enum that is fully checked
2025-07-18 13:21:56 +01:00
Gina Peter Banyard
aadd724362
ext/intl: Refactor IntlRuleBasedBreakIterator::__construct() ( #19164 )
...
There is no need to delegate this to a seperate function and overwrite the error handler to promote warnings
2025-07-17 23:00:05 +01:00
Tim Düsterhus
6b3f302132
streams: Re-add support for arbitrary metadata for stream notifier functions ( #19158 )
...
Support for attaching arbitrary metadata for consumption by stream notifier
functions got broken in php/php-src#19024 when the previous `zval ptr` got
changed to `zend_fcall_info_cache *fcc`, making the data specific to the
`user_space_stream_notifier`.
Fix this by changing the field to `void *ptr`, avoiding the indirection through
a `zval`, but preserving the ability to store arbitrary data. If necessary to
support different types than `IS_PTR`, extensions can heap-allocate a `zval` to
store within `->ptr` as a minimal change to keep compatibility with PHP 8.4 or
lower.
2025-07-17 23:01:43 +02:00
Tim Düsterhus
78d96e94fa
zend_API: Make scope
a const zend_class_entry*
for zend_update_property_*()
( #19156 )
...
Follow-up for php/php-src#19060 .
2025-07-17 22:11:24 +02:00
Niels Dossche
04eadc803d
Merge branch 'PHP-8.4'
...
* PHP-8.4:
NEWS for GH-19162
ext/socket: Remove incorrect zval_ptr_dtor
ext/hash: Remove incorrect zval_ptr_dtor
2025-07-17 21:53:39 +02:00
Niels Dossche
d9602e4362
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
NEWS for GH-19162
ext/socket: Remove incorrect zval_ptr_dtor
ext/hash: Remove incorrect zval_ptr_dtor
2025-07-17 21:52:23 +02:00
Niels Dossche
86aaded7e5
NEWS for GH-19162
...
Closes GH-19162.
2025-07-17 21:51:49 +02:00
Niels Dossche
d11099ae32
ext/socket: Remove incorrect zval_ptr_dtor
2025-07-17 21:50:35 +02:00
Niels Dossche
bdca73cc14
ext/hash: Remove incorrect zval_ptr_dtor
2025-07-17 21:50:35 +02:00
Tim Düsterhus
7f4076bae0
RFC: Clone with v2 ( #18747 )
...
RFC: https://wiki.php.net/rfc/clone_with_v2
Co-authored-by: Volker Dusch <volker@tideways-gmbh.com>
2025-07-17 21:13:42 +02:00
Niels Dossche
8629256dc7
Deduplicate error-handling code in finfo_open ( #19149 )
2025-07-17 20:45:09 +02:00
Niels Dossche
56308f6490
ext/standard/password: Use zend_string_efree() where possible ( #19150 )
2025-07-17 18:51:49 +02:00
Jakub Zelenka
a8a3c81528
Update NEWS for recent Curl changes [ci skip]
2025-07-17 15:00:56 +02:00
Emre Çalışkan
7fb6afbe9f
Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() ( #19147 )
...
This patch adds support for the CURLINFO_QUEUE_TIME_T constant in the
curl_getinfo() function when compiled with libcurl >= 8.6.0.
CURLINFO_QUEUE_TIME_T This constant allows retrieving the time (in
microseconds) that the request spent in libcurl’s connection queue
before it was sent.
2025-07-17 14:56:07 +02:00
Ilija Tovilo
0e80be83b3
Fix lineno for cpp assignment
...
We previously changed the lineno of the property to the cpp argument, but now
also update the lineno for RECV and ASSIGN_OBJ. No test because we don't have a
way to enable lineno's in the opcode dump, and this is not easily testable
through error messages.
2025-07-17 14:07:23 +02:00
Jakub Zelenka
a59caa3c33
Merge branch 'PHP-8.4'
2025-07-17 13:45:32 +02:00
Jakub Zelenka
554ae518a2
Merge branch 'PHP-8.3' into PHP-8.4
2025-07-17 13:45:14 +02:00
Jakub Zelenka
8516ae86d7
Skip LDAP TLS max version test for now
2025-07-17 13:44:21 +02:00
Tim Düsterhus
2e0c011fb8
zend_objects: Remove unnecessary refcounting when calling __clone()
( #19145 )
...
Found as part of the clone-with review in php/php-src#18747 .
2025-07-16 18:53:04 +02:00
Niels Dossche
62742996f8
Merge branch 'PHP-8.4'
...
* PHP-8.4:
ext/xml: Suppress libxml deprecation for `_xmlParserCtxt.inState` (#19131 )
2025-07-16 18:27:08 +02:00
Niels Dossche
826fa36ba3
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
ext/xml: Suppress libxml deprecation for `_xmlParserCtxt.inState` (#19131 )
2025-07-16 18:27:02 +02:00
Niels Dossche
034c3f2270
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
ext/xml: Suppress libxml deprecation for `_xmlParserCtxt.inState` (#19131 )
2025-07-16 18:26:54 +02:00
Niels Dossche
9eee4dd92b
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
ext/xml: Suppress libxml deprecation for `_xmlParserCtxt.inState` (#19131 )
2025-07-16 18:24:55 +02:00
Tim Düsterhus
a5df26691d
ext/xml: Suppress libxml deprecation for _xmlParserCtxt.inState
( #19131 )
...
The FreeBSD build fails due to the deprecation and -Werror:
2025-07-15T00:37:20.8390774Z /home/runner/work/php-src/php-src/ext/xml/compat.c:358:38: error: 'instate' is deprecated [-Werror,-Wdeprecated-declarations]
2025-07-15T00:37:20.8392577Z 358 | if (ret == NULL || parser->parser->instate == XML_PARSER_CONTENT) {
2025-07-15T00:37:20.8393184Z | ^
2025-07-15T00:37:20.8394006Z /usr/local/include/libxml2/libxml/parser.h:309:33: note: 'instate' has been explicitly marked deprecated here
2025-07-15T00:37:20.8394903Z 309 | xmlParserInputState instate XML_DEPRECATED_MEMBER;
2025-07-15T00:37:20.8395413Z | ^
2025-07-15T00:37:20.8396166Z /usr/local/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
2025-07-15T00:37:20.8397058Z 74 | #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
2025-07-15T00:37:20.8397581Z | ^
2025-07-15T00:37:20.8425542Z 1 error generated.
2025-07-16 18:23:54 +02:00
Samuel Melrose
6f1501a601
Add opcache_is_script_cached_in_file_cache() function
...
Closes GH-16979
2025-07-16 17:37:12 +02:00
Jakub Zelenka
b9844b545f
Merge branch 'PHP-8.4'
2025-07-16 17:32:20 +02:00
Jakub Zelenka
a57f58253a
Merge branch 'PHP-8.3' into PHP-8.4
2025-07-16 17:31:24 +02:00
Jakub Zelenka
eade5c17ea
Fix GH-18529: additional inheriting of TLS int options
...
This is for LDAP_OPT_X_TLS_PROTOCOL_MIN and LDAP_OPT_X_TLS_PROTOCOL_MAX
It also adds a test that uses LDAPCONF with TLS max version lower than
the minimum TLS server version so it should always fail. However it
does not fial for the second case without this change which confirms
that the change works as expected.
Closes GH-18676
2025-07-16 17:29:42 +02:00
Jakub Zelenka
2afab21ffb
Merge branch 'PHP-8.4'
2025-07-16 14:15:14 +02:00
Jakub Zelenka
4647dfc988
Merge branch 'PHP-8.3' into PHP-8.4
2025-07-16 14:10:35 +02:00
Jakub Zelenka
faf833bffc
PHP 8.3 is now for PHP-8.3.25-dev
2025-07-16 14:09:24 +02:00
Emre Çalışkan
e84320ad75
Add support for CURLINFO_CONN_ID in curl_getinfo() ( #18984 )
...
This patch adds support for the CURLINFO_CONN_ID constant in the curl_getinfo() function when compiled with libcurl >= 8.2.0.
CURLINFO_CONN_ID allows retrieving the unique identifier of the underlying connection used in the most recent transfer. This is useful for advanced features like connection reuse tracking, diagnostics, or connection pooling implementations at the PHP level.
2025-07-16 11:08:19 +02:00
Jakub Zelenka
2ecafd41ba
Remove curl OpenSSL locking for unsupported versions ( #18784 )
2025-07-16 11:06:21 +02:00
Niels Dossche
484d4351c2
Remove redundant operations from zend_llist_clean() ( #19143 )
...
This function calls zend_llist_destroy() which already sets the head and
tail pointers since c732ab40
.
2025-07-16 09:08:30 +02:00
Máté Kocsis
02b94556cf
Add missing news and upgrading notes for ext/uri
...
[skip ci]
2025-07-15 22:45:59 +02:00
Máté Kocsis
967377369b
Fix parsing URIs with empty hosts
...
Both RFC 3986 and WHATWG support empty hosts
2025-07-15 22:28:44 +02:00
Máté Kocsis
889f38135d
Cherry pick some recent lexbor changes
...
The following changes are cherry-picked:
- c60846689d
core/str.c: Fix undefined behavior in function lexbor_str_append
- 92260fd670
URL: fixed hostname setter if port is specified.
2025-07-15 22:28:16 +02:00
Niels Dossche
a22dc67a21
hash: Use zend_string_efree() where possible ( #19137 )
...
Mainly motivated to reduce machine code bloat.
2025-07-15 22:03:34 +02:00
Niels Dossche
478a520900
Fix incorrect OpenSSL merge
2025-07-15 21:07:25 +02:00
Niels Dossche
a22eb4d3e5
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix error return check of EVP_CIPHER_CTX_ctrl()
Fix memleak on failure in collator_get_sort_key()
2025-07-15 20:39:30 +02:00
Niels Dossche
0f731b455c
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix error return check of EVP_CIPHER_CTX_ctrl()
Fix memleak on failure in collator_get_sort_key()
2025-07-15 20:38:22 +02:00
Niels Dossche
cd8722304c
Fix error return check of EVP_CIPHER_CTX_ctrl()
...
OpenSSL can return -1 on error [1, 2], and OpenBSD's docs confirm this
[3]. Change all checks to <= 0.
[1] b3161bd9a9/crypto/evp/evp_enc.c (L1530-L1531)
[2] b3161bd9a9/crypto/evp/evp_enc.c (L1611)
[3] https://man.openbsd.org/EVP_CIPHER_CTX_ctrl.3
Closes GH-18987.
2025-07-15 20:37:33 +02:00
Niels Dossche
b495ce0371
Fix memleak on failure in collator_get_sort_key()
...
Closes GH-19138.
2025-07-15 20:36:56 +02:00
Niels Dossche
1089896b8c
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-18986: OpenSSL backend: incorrect RAND_{load,write}_file() return value check
2025-07-15 18:52:56 +02:00
Niels Dossche
f938f356cb
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-18986: OpenSSL backend: incorrect RAND_{load,write}_file() return value check
2025-07-15 18:50:46 +02:00
Niels Dossche
a8086be81c
Fix GH-18986: OpenSSL backend: incorrect RAND_{load,write}_file() return value check
...
As noted by the LibreSSL maintainer, these functions return -1 on error.
This is further confirmed by my static analyzer that inferred the same
thing for OpenSSL.
Closes GH-19013.
2025-07-15 18:50:19 +02:00
Calvin Buckley
7232c15b3e
Merge branch 'PHP-8.4'
...
* PHP-8.4:
PHP-8.4 is now for PHP 8.4.12-dev
2025-07-15 13:50:05 -03:00
Calvin Buckley
3d468a181a
PHP-8.4 is now for PHP 8.4.12-dev
2025-07-15 13:46:33 -03:00
Dmitrii Derepko
ea9a7b2523
refactor: Drop unused op_array param from zend_get_brk_cont_target() (GH-19117)
2025-07-15 16:38:00 +02:00
Tim Düsterhus
b08753eef0
[skip ci] Fix NEWS for GH-19114
...
This did not make the cut for Alpha 2.
2025-07-15 14:28:57 +02:00
Volker Dusch
fec641d27a
Update NEWS for PHP 8.5.0 alpha2
2025-07-15 14:23:06 +02:00
David Carlier
64852b44b5
ext/sockets: multicast on unsupported socket type error change.
...
From a mere warning to an exception.
close GH-19114
2025-07-15 13:05:13 +01:00