1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

144604 Commits

Author SHA1 Message Date
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
Calvin Buckley
6ceb887dc2 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix skipif for mkfifo usage in gh20582.phpt (#20804)
2025-12-31 13:05:27 -04:00
Calvin Buckley
bd484ed65f Fix skipif for mkfifo usage in gh20582.phpt (#20804)
Makes it like ext/standard/tests/file/filetype_variation.phpt; it's not
just Windows that can have a missing posix_mkfifo, but also a minimal
build, like the ones suggested that RMs test with (using --disable-all).
2025-12-31 13:04:09 -04:00
David Carlier
b56b8d0967 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20767: build failure with preserve_none attribute enabled on mac.
2025-12-31 11:15:14 +00:00
David Carlier
95a83956a4 Fix GH-20767: build failure with preserve_none attribute enabled on mac.
Established that build < 1700.4.4.1 tends to fail thus we disable the
preserve_none attribute feature for these cases.

close GH-20777
2025-12-31 11:14:18 +00:00
Arnaud Le Blanc
6487049988 Merge branch 'PHP-8.5'
* PHP-8.5:
  Make preserve_none check lto compatible
2025-12-31 11:39:17 +01:00
henderkes
02a6fecb97 Make preserve_none check lto compatible
Fixes GH-20806
Closes GH-20810
2025-12-31 11:38:21 +01:00
Weilin Du
4f793ba1c3 [skip ci] Fix duplicate words typos (GH-20800) 2025-12-31 02:22:09 +01:00
Daniel Scherzer
bc15a0dd4c Merge branch 'PHP-8.5'
* PHP-8.5:
  PHP-8.5 is now for PHP 8.5.3-dev
2025-12-30 14:29:04 -08:00
Daniel Scherzer
daf4d54610 PHP-8.5 is now for PHP 8.5.3-dev 2025-12-30 14:27:29 -08:00
Jakub Zelenka
ab5c2a826a Use long conversion for stream context keepalive int values (#20805)
This is consistent with http and ssl wrappers where int values
are converted in this way.
2025-12-30 22:08:35 +01:00
Calvin Buckley
0578279fed Merge branch 'PHP-8.5'
* PHP-8.5:
  PHP 8.4 is now for PHP 8.4.18-dev
2025-12-30 16:56:03 -04:00
Calvin Buckley
21706fad8d Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  PHP 8.4 is now for PHP 8.4.18-dev
2025-12-30 16:55:41 -04:00
Jakub Zelenka
c0be847a7e Prevent possible future precedence issues in PHP_SOCKVAL_IS_SET 2025-12-30 18:56:57 +01:00
Calvin Buckley
5726e53b39 PHP 8.4 is now for PHP 8.4.18-dev 2025-12-30 13:07:11 -04:00
Jakub Zelenka
0fd8aae6e8 Fix TCP_KEEPALIVE no inheriting for accepted sockets on MacOS 2025-12-30 16:53:22 +01:00
Jakub Zelenka
9582d8e6d7 Add stream socket keepalive context options
This adds so_keepalive, tcp_keepidle, tcp_keepintvl and tcp_keepcnt
stream socket context options that are used to set their upper case
C macro variants by setsockopt function.

The test requires sockets extension and just tests that the values are
being set. This is because a real test would be slow and difficult to
show that those options really work due to how they work internally.

Closes GH-20381
2025-12-30 16:52:22 +01:00
Jakub Zelenka
bd8da04def Merge branch 'PHP-8.5'
* PHP-8.5:
  PHP-8.3 is now for PHP-8.3.31
2025-12-30 13:16:27 +01:00
Jakub Zelenka
a403afab65 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  PHP-8.3 is now for PHP-8.3.31
2025-12-30 13:16:00 +01:00
Jakub Zelenka
5ee2add76b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  PHP-8.3 is now for PHP-8.3.31
2025-12-30 13:15:22 +01:00