Commit Graph

15803 Commits

Author SHA1 Message Date
David Carlier
d713e3619e
ext/sockets: adding SO_BINDTOIFINDEX.
similar to SO_BINDTODEVICE but works with interface ids instead.

close GH-15479
2024-08-18 16:44:32 +01:00
David CARLIER
b5568a008f
GH-15440: adding CURLOPT_TCP_KEEPCNT constant (8.9.0) (#15446)
close GH-15446
2024-08-16 20:47:41 +01:00
Go Kudo
14390a04bb [ci skip] Update NEWS 2024-08-17 02:59:24 +09:00
Calvin Buckley
d5d537bf7c
[ci skip] Update NEWS for PHP 8.4.0 beta3
Skipping beta2 due to a release issue.
2024-08-14 18:05:48 -03:00
Calvin Buckley
9a70b7c221
[ci skip] Update NEWS for PHP 8.4.0 beta2 2024-08-14 17:30:20 -03:00
jrfnl
ddaeb203b2 [skip ci] 8.4 | UPGRADING: fix incorrect function names
Ref: 1cf8291c85 (diff-d22d5ad00ee9f000cb8c8f9a5cfb905a8de91e7dc4a633896e2c5ab4ad1513d1)
2024-08-14 16:57:23 +02:00
Tim Düsterhus
a2a3c5ba8a
hash: Consistently check for PHP_HASH_INTRIN_SHA_* to guard compilation of SHA256_Transform_shani (#15404)
This fixes the build for amd64 platforms that do not have
`HAVE_FUNC_ATTRIBUTE_TARGET`, specifically Alpine/Musl as of now.

Closes GH-15384.
Related to GH-15312.
2024-08-14 15:18:07 +02:00
Gina Peter Banyard
74bf894950
ext/standard/info.c: Throw ValueErrors on invalid inputs to php_uname() (#15385) 2024-08-14 13:20:26 +01:00
Gina Peter Bnayard
d100caa476 [skip ci] Add NEWS/UPGRADING + wording amendment for GH-13483 2024-08-14 13:52:19 +02:00
Calvin Buckley
8c4d5a1814
[ci skip] Update NEWS for PHP 8.4.0 beta1
Also move this news item up to beta2 since it happened while I was
tagging beta1.
2024-08-13 11:06:32 -03:00
Ilija Tovilo
be6dee3c5d
Reset seen symbols when ending namespace (GH-15244)
Previously, seen symbols were never cleaned during the compilation of a single
file. This makes it impossible to use a class or function from a different
namespace if such a symbol is also declared within the same file. This is
inconsistent with how it would work when split into different files.
2024-08-13 15:47:14 +02:00
David Carlier
d052d612d9
ext/sockets: adding SOCK_CLOEXEC/SOCK_NONBLOCK options.
targetted for socket_create_pair/socket_create, they re not considered
as socket type but to be ORed with these (to avoid socketpair2/socket2
likely), set O_CLOEXEC/O_NONBLOCK respectively on the file descriptors.

close GH-15322
2024-08-13 08:35:44 +01:00
Simonov Denis
225034dbbc
pdo_firebird: Formatting time zone types
As a follow-up to the commit which introduced support for Firebird 4.0+
data types[1], we add support for formats for types with time zones.

Since this uses the newer Firebird C++ API, pdo_firebird now requires a
C++ compiler to be built.

[1] <https://github.com/php/php-src/pull/14897>

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-15230.
2024-08-13 01:25:48 +02:00
Gina Peter Banyard
f5ae5ac804
ext/standard: Throw ValueErrors in str_getcsv() for invalid inputs (#15365)
This was forgotten when adjusting the behaviour of other CSV functions
2024-08-12 17:56:02 +01:00
Gina Peter Banyard
0a23b0678d
Deprecate using "_" as a class name (#15360)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_using_a_single_underscore_as_a_class_name
2024-08-12 16:10:30 +01:00
Gina Peter Banyard
c818d944cf
ext/(standard|spl): Deprecate passing a non-empty string as the $enclosure parameter (#15362) 2024-08-12 16:09:56 +01:00
Ayesh Karunaratne
81b49cd062
ext/curl: Add HTTP/3 constants (#15350)
This intends to supersede the two following PRs:
 - #12000 because it does not modify the stub file, but only update the
   arginfo file. It also proposes to merge to GA branches, and is
   currently marked as Requires RM Approval.
 - #12543 Essentially the same as this PR and from the same author, as
   this, but its about a year old and requires rebasing anyway.

This adds the `CURL_HTTP_VERSION_3` and `CURL_HTTP_VERSION_3ONLY`
constants on relevant versions (7.66 and 7.88 respectively).

It is possible to use HTTP/3 without having these constants declared,
but having them declared in PHP makes things more approachable and
"official".
2024-08-12 14:26:24 +01:00
Gina Peter Banyard
4f58d5b0df
ext/mysqli: Deprecate passing the parameter to mysqli_store_result() (#15311)
And deprecate the MYSQLI_STORE_RESULT_COPY_DATA constant.

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_the_second_parameter_to_mysqli_store_result
2024-08-11 19:25:35 +01:00
Gina Peter Bnayard
8c2ebc0a56 [skip ci] Add NEWS/UPGRADING entries for mysqli deprecations 2024-08-11 14:48:17 +02:00
David Carlier
1d198c660c
ext/sockets: controlling ephemeral port ranges on *BSD.
whether ephemeral ports are onto the privileged low port ranges
     or a range more fit for restricted scenarios.

close GH-15335
2024-08-10 22:16:51 +01:00
Niels Dossche
8d7365b6f0
Fix GH-15331: dom: Element::$substitutedNodeValue test failed
Bug in libxml, amend test to accept both outputs.
2024-08-10 19:43:21 +02:00
Arnaud Le Blanc
60a055f0fc
[ci skip] NEWS for GH-15275 2024-08-10 16:08:34 +02:00
David Carlier
d5c7f3b0e6
ext/standard: enabling feature detection auxiliary vector on OpenBSD.
close gh-15175
2024-08-10 12:36:10 +01:00
Gina Peter Banyard
42497c1ea5
ext/soap: Deprecate passing an int to SoapServer::addFunction() (#15310)
Also deprecate SOAP_FUNCTIONS_ALL constant.

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_soap_functions_all_constant_and_passing_it_to_soapserveraddfunction
2024-08-09 17:41:02 +01:00
Niels Dossche
00001c4a0c
Fix GH-15292: Dynamic AVX detection is broken for MSVC
See https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
For x64, either _M_X64 or _M_AMD64 would work but I'm going with what's
already used in php-src.

Closes GH-15301.
2024-08-09 18:11:46 +02:00
Gina Peter Banyard
1e3d918936
ext/core: Deprecate passing E_USER_ERROR to trigger_error() (#15308)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
2024-08-09 15:51:07 +01:00
Gina Peter Banyard
25b4696530
ext/xml: Deprecate xml_set_object() and passing non-callable strings as handlers (#15293) 2024-08-08 23:37:49 +01:00
Tim Düsterhus
6eca7839af
hash: Add SHA-NI implementation of SHA-256 (#15152)
* hash: Add SSE2 implementation of SHA-256

Implementation taken from
tarsnap/libcperciva@661752aee8.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>

* zend_cpuinfo: Add ZEND_CPU_FEATURE_SHA

* hash: Add SHA-NI implementation of SHA-256

Implementation taken from
tarsnap/libcperciva@661752aee8.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

* NEWS / UPGRADING

---------

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2024-08-08 22:19:33 +02:00
Gina Peter Banyard
c8b45aa59a
ext/spl: Follow-up on GH-9704 (#15295)
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2024-08-08 19:31:51 +01:00
Gina Peter Banyard
bb2836eced
ext/dba: Deprecate passing null|false to dba_key_split() (#15297)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_null_and_false_to_dba_key_split
2024-08-08 18:59:30 +01:00
Niels Dossche
74eff98c84
Deprecate passing incorrect data types for options to ext/hash functions (#15236)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_incorrect_data_types_for_options_to_exthash_functions
2024-08-06 19:13:09 +02:00
Quentin Dreyer
7b32a145d9
Fix GH-15155: Keep stream context in filtered streams
Closes GH-15156
2024-08-06 16:42:33 +01:00
Christoph M. Becker
887e6b9c45
Fix GH-15181: Disabled output handler is flushed again
When an `PHP_OUTPUT_HANDLER_FAILURE` occurs, the output handler becomes
disabled (i.e. the `PHP_OUTPUT_HANDLER_DISABLED` flag is set).  However,
there is no guard for disabled handlers in `php_output_handler_op()`
what may cause serious issues (as reported, UB due to passing `NULL` as
the 2nd argument of `memcpy`, because the handler's buffer has already
been `NULL`ed).  Therefore, we add a respective guard for disabled
handlers, and return `PHP_OUTPUT_HANDLER_FAILURE` right away.

Closes GH-15183.
2024-08-06 16:45:51 +02:00
Ilija Tovilo
2f27e0b2ab
Fix missing variance check for abstract set with asymmetric type (#15157)
Fixes GH-15140
2024-08-05 16:43:54 +02:00
Peter Kokot
0b25e26b4e
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
2024-08-05 15:54:50 +02:00
Ilija Tovilo
43f688e1ed
Fix zend_function.prop_info pointer for trait hooks (#15245)
Fixes GH-15240
2024-08-05 13:14:37 +02:00
Niels Dossche
d9eb3783bd
Remove DOMImplementation::getFeature() (#15233)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_domimplementationgetfeature_feature_version
2024-08-04 23:30:52 +02:00
Niels Dossche
0aec0faa27
Deprecate DOM_PHP_ERR (#15234)
* Deprecate DOM_PHP_ERR

RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_dom_php_err_constant

* Apply suggestions from code review

Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>

---------

Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2024-08-04 22:00:01 +02:00
Jorg Adam Sowa
b9fef523c1
Deprecate date_sunrise and date_sunset constants (#12978)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 20:07:52 +02:00
Tim Düsterhus
e8ff7c70f9
session: Deprecate session.sid_length and session.sid_bits_per_character (#15213)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 18:25:31 +02:00
Tim Düsterhus
f5f9294153
random: Deprecate lcg_value() (#15211)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 18:24:21 +02:00
Tim Düsterhus
ecd11b9687
unserialize: Deprecate the 'S' tag (#12309)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 18:23:19 +02:00
Peter Kokot
20ea4eadc6
[skip ci] Fix NEWS entry for config.* scripts 2024-08-03 01:33:28 +02:00
Peter Kokot
e02fa5f825
Autotools: Update config.guess to 2024-07-27 and config.sub to 2024-05-27 (#15190)
```
wget -O build/config.guess https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
wget -O build/config.sub https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
```
2024-08-03 01:31:34 +02:00
Niels Dossche
76ad89ccff
Fix GH-15192: Segmentation fault in dom extension (html5_serializer)
When cloning a document, doc will not be equal to the actual new
document clone->doc. clone->doc will always point to the correct
document so use that instead when comparing document nodes.

Closes GH-15198.
2024-08-02 18:22:17 +02:00
David Carlier
3c36c7308d
sapi/phpdbg: windows update exception type falling into segfault.
close GH-15098
2024-08-01 11:49:13 +01:00
Saki Takamachi
0f2f7c6fb4
[skip ci] Update NEWS for PHP 8.4.0alpha4 2024-08-01 09:41:27 +09:00
Saki Takamachi
60afeb5537
RFC: Change GMP bool cast behavior (#15151)
Implementation of "RFC: Change GMP bool cast behavior"

https://wiki.php.net/rfc/fix_up_bcmath_number_class

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2024-07-31 00:41:49 +09:00
Saki Takamachi
0e33b8dad9
Update NEWS for PHP 8.4.0alpha3 2024-07-30 22:09:31 +09:00
Arnaud Le Blanc
c7b65508d3
[ci skip] NEWS 2024-07-30 15:03:21 +02:00