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

133400 Commits

Author SHA1 Message Date
Levi Morrison
f1f04cf0c9 Merge branch 'PHP-8.3' 2023-09-25 08:27:46 -06:00
Levi Morrison
8fb51d4fe4 Set func pointer to null in Closure __invoke (#12275) 2023-09-25 08:27:23 -06:00
Niels Dossche
12790b2b35 Extend C14N fast path to HTML documents too (#12293) 2023-09-24 22:18:32 +02:00
Jakub Zelenka
96a30882ca Merge branch 'PHP-8.3' 2023-09-24 16:51:35 +01:00
Jakub Zelenka
5e8c992c78 Reduce impact of stream file path check in filestat
Fix for #76857 introduced slight perf regression so this is an attempt
to fix it. The idea is to re-use stream path check from ZendAccelerator
that should be quicker than strstr.

Signed-off-by: Jakub Zelenka <bukka@php.net>
2023-09-24 16:50:01 +01:00
Tim Düsterhus
9e66bc9b97 abs: Make value == ZEND_LONG_MIN an unexpected branch
As suggested in GH-12286. This results in slightly better assembly in clang,
because the expected case will be handled by a forward jump that is not taken.
2023-09-24 17:37:09 +02:00
Tim Düsterhus
865535267b round: Make fractional == 0.5 an unexpected branch
This does indeed result in slightly better assembly for clang.
2023-09-24 17:15:09 +02:00
David Carlier
4834e7ede5 Merge branch 'PHP-8.3' 2023-09-24 15:21:10 +01:00
David Carlier
4400eb270f Merge branch 'PHP-8.2' into PHP-8.3 2023-09-24 15:20:24 +01:00
David Carlier
4bfd3459fe Merge branch 'PHP-8.1' into PHP-8.2 2023-09-24 15:19:02 +01:00
David Carlier
d65c80031a Fix GH-12190: stream_context_create with address and port at 0.
Prior to the 8.1 rewrite, inet_aton was used for ipv4 addresses
therefore addresses like `0` passed.
For the bindto's case where both ip and port are set as such, we discard
the address binding.

Close GH-12195
2023-09-24 15:17:53 +01:00
Tim Düsterhus
82aad0b483 Unify type juggling in math.c (#12286)
- Consistently use a `switch()` with `EMPTY_SWITCH_DEFAULT_CASE();`
- Consistently use `zval_get_double()` for multi-type / non-double zvals
  instead of casting manually.
2023-09-24 14:55:26 +02:00
David Carlier
0a8ff0bb3e Merge branch 'PHP-8.3' 2023-09-24 08:10:01 +01:00
Thomas Hurst
66a33dbdce Fix GH-12273 - configure __builtin_cpu_init() check
__builtin_cpu_init() is documented as having a void return type.  It happens to
return int on gcc, but is void on clang.

Close GH-122274
2023-09-24 08:08:08 +01:00
David Carlier
a209ac61cd Merge branch 'PHP-8.3' 2023-09-24 08:05:16 +01:00
David Carlier
0c022ec163 Merge branch 'PHP-8.2' into PHP-8.3 2023-09-24 08:05:05 +01:00
David Carlier
5df291e835 Merge branch 'PHP-8.1' into PHP-8.2 2023-09-24 08:04:30 +01:00
Thomas Hurst
d93800ec0f Fix GH-12273 - configure __builtin_cpu_init() check
__builtin_cpu_init() is documented as having a void return type.  It happens to
return int on gcc, but is void on clang.

Close GH-122274
2023-09-24 08:04:02 +01:00
Niels Dossche
6a7b96529b Remove unnecessary libxml2 version checks
The minimum required version is 2.9.0. So these checks are useless.
2023-09-24 00:17:52 +02:00
David Carlier
ab22571981 Merge branch 'PHP-8.3' 2023-09-23 20:13:45 +01:00
David Carlier
d9e72bcdab Merge branch 'PHP-8.2' into PHP-8.3 2023-09-23 20:12:56 +01:00
David Carlier
36f78862c8 Merge branch 'PHP-8.1' into PHP-8.2 2023-09-23 20:12:41 +01:00
David Carlier
a80db7b52a Fix GH-12282: IntlDateFormatter::construct should throw an exception is the locale field has an invalid value.
Close GH-12282
2023-09-23 20:12:13 +01:00
Niels Dossche
916dedf7d7 Add additional test for special cases for C14N 2023-09-23 20:56:18 +02:00
Niels Dossche
554f659602 Remove unnecessary invalidation 2023-09-23 20:56:18 +02:00
Niels Dossche
5d68d61943 Implement #53655: Improve speed of DOMNode::C14N() on large XML documents
The XPath query is in accordance to spec [1]. However, we can do it in a
simpler way. We can use a custom callback function instead of a linear
search in XPath to check if a node is visible. Note that comment nodes
are handled internally by libxml2 already, so we do not need to
differentiate between node types. The callback will do an upwards
traversal of the tree until the root of the canonicalization is reached.
In practice this will speed up the application a lot.

[1] https://www.w3.org/TR/2001/REC-xml-c14n-20010315 section 2.1

Closes GH-12278.
2023-09-23 20:56:16 +02:00
divinity76
ab30f27ce3 random: Perform fewer iterations if SKIP_SLOW_TESTS is set (#12279)
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2023-09-23 14:48:33 +02:00
Lewis Cowles
b94ef611e3 ci: more verbose output (#12264) 2023-09-23 01:34:48 +02:00
Niels Dossche
1df8fd4f12 Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] Move things to the right section in UPGRADING
2023-09-22 23:55:36 +02:00
Niels Dossche
ce6e58cf63 [ci skip] Move things to the right section in UPGRADING 2023-09-22 23:55:23 +02:00
Peter Kokot
abed8b8e41 Remove _IO_cookie_io_functions_t in favor of cookie_io_functions_t
As noted in glibc, the cookie_io_functions_t should be used instead of
internal _IO_cookie_io_functions_t.

The _IO_cookie_io_functions_t was once used as a convenience for not
having the cookie_io_functions_t available (glibc <=2.1.1) as noted in
67bb9d1ae2.

Check in the build system was also always setting the
COOKIE_IO_FUNCTIONS_T to cookie_io_functions_t due to a typo. There is
unused variable have_IO_cookie_io_functions_t vs.
have_cookie_io_functions_t.

- COOKIE_IO_FUNCTIONS_T removed

Closes GH-12236
2023-09-22 22:31:19 +02:00
Tim Düsterhus
659c06d4c9 UPGRADING: Move the validation of the rounding mode to Backward Incompatible Changes 2023-09-22 17:35:03 +02:00
Tim Düsterhus
3d857d5b81 round(): Validate the rounding mode (#12252) 2023-09-22 17:32:09 +02:00
David Carlier
f6fae19a10 ext/intl: expose dateformat UDAT_PATTERN constant.
Close GH-12258
2023-09-22 12:32:22 +01:00
Ilija Tovilo
62e2402534 Use autoconf for recognizing __builtin_unreachable() (#12266)
Older versions of GCC don't support __has_builtin(), but do support
__builtin_unreachable().
2023-09-22 11:53:09 +02:00
Ilija Tovilo
77bc5aafe1 Merge branch 'PHP-8.3'
* PHP-8.3:
  support running testsuite with negative niceness (#11481)
2023-09-22 11:33:45 +02:00
Ilija Tovilo
73033cc928 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  support running testsuite with negative niceness (#11481)
2023-09-22 11:33:40 +02:00
Ilija Tovilo
88f6b5288f Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  support running testsuite with negative niceness (#11481)
2023-09-22 11:33:36 +02:00
divinity76
4f044e9238 support running testsuite with negative niceness (#11481)
* support running testsuite with negative niceness

a bug in the regex would break getNice() if the current niceness was negative, which would make the whole test fail.

Previously:
this would fail:
time sudo nice --adjustment=-19 ./php run-tests.php -j$(nproc) -x --offline ext/standard/tests/general_functions/proc_nice_basic.phpt --color --show-all

and this would work: 
time sudo ./php run-tests.php -j$(nproc) -x --offline ext/standard/tests/general_functions/proc_nice_basic.phpt --color --show-all

* Update ext/standard/tests/general_functions/proc_nice_basic.phpt

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>

---------

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
2023-09-22 11:33:25 +02:00
Ilija Tovilo
60722b9773 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix getpriority test with negative return value
2023-09-22 10:26:17 +02:00
Ilija Tovilo
8eb740b432 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix getpriority test with negative return value
2023-09-22 10:26:10 +02:00
Ilija Tovilo
645ea22390 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix getpriority test with negative return value
2023-09-22 10:26:01 +02:00
Ilija Tovilo
181598d403 Fix getpriority test with negative return value
Negative return values are valid and denote higher priority.

https://man7.org/linux/man-pages/man2/setpriority.2.html
2023-09-22 10:25:15 +02:00
Niels Dossche
edd72da03a Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] NEWS
2023-09-21 20:05:05 +02:00
Niels Dossche
64a5147064 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
2023-09-21 20:04:42 +02:00
Niels Dossche
5b62df1d85 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
2023-09-21 20:04:24 +02:00
Niels Dossche
ca5f9e812a [ci skip] NEWS
Remove redundant whitespace
2023-09-21 20:03:59 +02:00
Niels Dossche
1b199d3b77 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix memory leak when calling xml_parse_into_struct() twice
  Fix return type of stub of xml_parse_into_struct()
2023-09-21 19:52:37 +02:00
Niels Dossche
2bbe4fda75 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix memory leak when calling xml_parse_into_struct() twice
  Fix return type of stub of xml_parse_into_struct()
2023-09-21 19:52:21 +02:00
Niels Dossche
2aea9be3ea Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix memory leak when calling xml_parse_into_struct() twice
  Fix return type of stub of xml_parse_into_struct()
2023-09-21 19:51:14 +02:00