1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Commit Graph

144623 Commits

Author SHA1 Message Date
Ilija Tovilo ebef772cfd Merge branch 'PHP-8.5'
* PHP-8.5:
  [skip ci] Mark bug69442.phpt (PTY test) as flaky
2026-01-08 12:27:20 +01:00
Ilija Tovilo a5c7903fbb Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [skip ci] Mark bug69442.phpt (PTY test) as flaky
2026-01-08 12:27:13 +01:00
Ilija Tovilo 226f68b24f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Mark bug69442.phpt (PTY test) as flaky
2026-01-08 12:27:06 +01:00
Ilija Tovilo 33c3e30ed6 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Mark bug69442.phpt (PTY test) as flaky
2026-01-08 12:27:00 +01:00
Ilija Tovilo 4f25ea88f0 [skip ci] Mark bug69442.phpt (PTY test) as flaky
See GH-20864
2026-01-08 12:26:20 +01:00
Arnaud Le Blanc ef522525cf Introduce zend_ast_call_get_args() (#20859) 2026-01-08 11:46:10 +01:00
Arnaud Le Blanc 92b2887722 Fix handling of ZEND_AST_CALLABLE_CONVERT in file cache (#20860)
Nodes in zend_ast_fcc->args were serialized, but not zend_ast_fcc->args itself
2026-01-07 18:54:29 +01:00
Frank Denis 643cf6253e Merge branch 'PHP-8.5'
* PHP-8.5:
  ext/sodium: use correct constants and error messages (#20852)
2026-01-07 09:53:54 +01:00
Frank Denis a04fa6c1f0 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/sodium: use correct constants and error messages (#20852)
2026-01-07 09:51:46 +01:00
Frank Denis 83f3d5d487 ext/sodium: use correct constants and error messages (#20852)
Fix copy-and-paste mistakes in the sodium extension.

crypto_scalarmult_BYTES and crypto_scalarmult_ristretto255_BYTES
have the same value, so behavior is unchanged.
2026-01-07 09:45:06 +01:00
Arnaud Le Blanc 5472cac806 Support PFA syntax
RFC: https://wiki.php.net/rfc/partial_function_application_v2

For FCCs, the parser generates a normal function call AST node, the but argument
list is a ZEND_AST_CALLABLE_CONVERT / zend_ast_fcc node.

We extend this for PFAs so that zend_ast_fcc can represent arguments.

 * Support PFA syntax in grammar
 * Update zend_ast_fcc so that arguments can be represented
 * Support serialization of zend_ast_fcc arguments in SHM / file cache
 * Introduce zend_ast_arg_list_add(): Same as zend_ast_list_add(), but wraps the
   list in a ZEND_AST_CALLABLE_CONVERT when adding any placeholder argument.

Technically the arg list wrapping is not required, but it results in simpler
code later as it will be very convenient in the compiler (determines whether a
function calls is a PFA/FCC), and for PFA-in-const-expr support. It also allows
to unify FCCs and PFAs in the grammar.

Closes GH-20717.
2026-01-06 12:01:48 +01:00
Niels Dossche e4098da58a Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20833: mb_str_pad() divide by zero if padding string is invalid in the encoding
2026-01-05 20:01:59 +01:00
Niels Dossche 171b52c98f Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20833: mb_str_pad() divide by zero if padding string is invalid in the encoding
2026-01-05 20:01:54 +01:00
Niels Dossche 03113b09ce Fix GH-20833: mb_str_pad() divide by zero if padding string is invalid in the encoding
If the padding string is not valid in the given encoding,
mb_get_strlen() can return 0.

Closes GH-20834.
2026-01-05 20:01:25 +01:00
Remi Collet 988d29b4db Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix missing liburiparser linker option
2026-01-05 08:19:22 +01:00
Remi Collet 9b089edcbd Fix missing liburiparser linker option 2026-01-05 08:19:07 +01:00
Jordi Kroon cb63e4f998 [skip ci] Remove obsolete comment (GH-20826) 2026-01-04 01:27:40 +01:00
Ilija Tovilo 9c4b29b236 Merge branch 'PHP-8.5'
* PHP-8.5:
  Remove duplicate no/yes print for preserve_none
2026-01-04 01:24:45 +01:00
henderkes 7b70ee5a9d Remove duplicate no/yes print for preserve_none
Closes GH-20827
2026-01-04 01:24:35 +01:00
Giovanni Giacobbi fd0ed00ff3 curl: Deduplicate features array 2026-01-03 18:49:23 +00:00
Giovanni Giacobbi 50af7c7373 curl: Fix coding style 2026-01-03 18:49:23 +00:00
Jakub Zelenka 8422224091 Update NEWS and UPGRADING with addition of JSON error locations 2026-01-03 18:40:57 +01:00
Juan Morales b80ffc5b2e Json last error msg/error message with location error (#20629)
This slightly extend error messages with locations taken from scanner / parser
2026-01-03 18:34:19 +01:00
Niels Dossche 46a1534e64 [ci skip] Fix NEWS entries
These entries are duplicates, but also shouldn't be here in the first
place because they were also merged into stable branches.
2026-01-03 16:40:11 +01:00
Jakub Zelenka db65503cbc Merge branch 'PHP-8.5'
* PHP-8.5:
  Update NEWS with fix for bug #74357
  Fix bug #74357: lchown fails to change ownership of symlink with ZTS
2026-01-03 14:51:26 +01:00
Jakub Zelenka bddd6b0cd3 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update NEWS with fix for bug #74357
  Fix bug #74357: lchown fails to change ownership of symlink with ZTS
2026-01-03 14:50:27 +01:00
Jakub Zelenka 1c9f117d74 Update NEWS with fix for bug #74357 2026-01-03 14:45:42 +01:00
Jakub Zelenka 91ac825278 Fix bug #74357: lchown fails to change ownership of symlink with ZTS 2026-01-03 14:41:57 +01:00
Niels Dossche 4c9bbaa79d Merge branch 'PHP-8.5'
* PHP-8.5:
  streams/memory: Ensure internal string is NUL terminated (#20812)
2026-01-02 18:03:41 +01:00
Niels Dossche de1465e5ae Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  streams/memory: Ensure internal string is NUL terminated (#20812)
2026-01-02 18:03:36 +01:00
Niels Dossche 5484ebcc49 streams/memory: Ensure internal string is NUL terminated (#20812)
zend_string_truncate() doesn't put a NUL byte.
2026-01-02 18:03:17 +01:00
Niels Dossche 971728fe10 Fix GH-20679: finfo_file() doesn't work on remote resources (#20700)
The remote resources don't work because remote streams don't have a stat
method.
Since the check is only here for a best-effort check to return
"directory" instead of "empty", we can try the stat and still execute
the magic_stream() code even if it failed. Unfortunately we can't
distinguish between a failed stat and an unimplemented stat. If we
could, then this code could be even more robust.
2026-01-02 17:57:30 +01:00
Ilija Tovilo 610361845b Remove unnecessary optimization FIXME
As the comment suggests, the return value of frameless calls is rarely not used.
When it isn't used (and isn't refcounted) the FREE is already elided by the
optimizer.

Closes GH-20819
2026-01-02 17:08:28 +01:00
Niels Dossche 8f8d2a4cae Merge branch 'PHP-8.5'
* PHP-8.5:
  uri: Fix RFC3986 to_string implementation with ExcludeFragment returning non-terminated strings (#20811)
2026-01-02 15:00:58 +01:00
Niels Dossche 3f7bfaf3ae uri: Fix RFC3986 to_string implementation with ExcludeFragment returning non-terminated strings (#20811)
zend_string_truncate() doesn't put a NUL byte.
Right now this doesn't matter as this code path is only hittable via the
equals() method, but if other extension (or future other code) starts
using this code path, then it can be problematic as all user-exposed
zend_strings need to end with a NUL byte.
2026-01-02 15:00:47 +01:00
Niels Dossche ac4e3cdec0 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-18139: Memory leak when overriding some settings via readline_info()
2026-01-02 13:04:44 +01:00
Niels Dossche d9b02e43c3 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-18139: Memory leak when overriding some settings via readline_info()
2026-01-02 13:04:35 +01:00
Niels Dossche 30ed81314b Fix GH-18139: Memory leak when overriding some settings via readline_info()
The reason why freeing was not done yet is because the pointer in these
variables may be:
- Static data set by the readline/libedit library initially, not heap
  data.
- Data set by another thread. Although the libraries appear to be not
  thread-safe anyway.

To solve this, introduce some TLS variables to hold a pointer for us
when we override the settings, such that we can free them and are
certain they are allocated by us.

Closes GH-20794.
2026-01-02 13:04:13 +01:00
David Carlier 8c4f806fe8 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20802: undefined behavior with invalid SNI_server_certs options.
2026-01-01 21:10:33 +00:00
David Carlier b6a3852b31 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20802: undefined behavior with invalid SNI_server_certs options.
2026-01-01 21:09:01 +00:00
David Carlier cdcc0c2cd8 Fix GH-20802: undefined behavior with invalid SNI_server_certs options.
close GH-20803
2026-01-01 21:08:35 +00:00
Jakub Zelenka e49be5f8e2 Allow filtered streams to be casted as fd for select
This removes the artificial limitation that is not necessary. The fact
that some streams can have some data buffered is not a problem because
the similar situation is already present for OpenSSL streams where
OpenSSL can internally buffer data for the unprocessed part of the
record.

Closes GH-20540
2026-01-01 20:51:23 +01:00
Ben Ramsey 241e43f2d8 Merge branch 'PHP-8.5' 2025-12-31 17:06:33 -06:00
Ben Ramsey 94087c084c Merge branch 'PHP-8.4' into PHP-8.5 2025-12-31 17:06:12 -06:00
Ben Ramsey 6e8f06f62a Merge branch 'PHP-8.3' into PHP-8.4 2025-12-31 17:04:55 -06:00
Ben Ramsey 604aec3956 Merge branch 'PHP-8.2' into PHP-8.3 2025-12-31 17:04:22 -06:00
Ben Ramsey 8c303713f1 Merge branch 'PHP-8.1' into PHP-8.2 2025-12-31 17:03:58 -06:00
Ben Ramsey 6f82565f12 PHP 8.1 is now end-of-life 2025-12-31 16:58:52 -06:00
Calvin Buckley 9170c4b2f8 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix skipif for mkfifo usage in gh20582.phpt (#20804)
2025-12-31 13:06:02 -04:00
Calvin Buckley 8b0310afdc Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix skipif for mkfifo usage in gh20582.phpt (#20804)
2025-12-31 13:05:52 -04:00