Commit Graph

137926 Commits

Author SHA1 Message Date
Ilija Tovilo
1be989bbf0
[skip ci] Move brew install libsodium to reinstall
Gets rid of the "already installed" warning on master.
2024-09-17 12:35:07 +02:00
Ayesh Karunaratne
5fa082316b
CI: Update actions/cache in nightly run to v4 (#15933) 2024-09-17 08:51:57 +02:00
Ayesh Karunaratne
3afb96184e ext/mbstring: Update to Unicode 16
Updates UCD to Unicode 16.0 (released 2024 Sept).

Previously: 0fdffc18, #7502, #14680

Unicode 16 adds several new character sets and case folding rules.
However, the existing ucgendat script can still parse them.

This also adds a couple test cases to make sure the new rules for
East Asian Wide characters and case folding work correctly. These
tests fail on Unicode 15.1 and older because those verisons do not
contain those rules.
2024-09-17 10:40:00 +09:00
DanielEScherzer
71edc05139
php_reflection.c: make a bunch of pointers const (#15927)
* php_reflection.c: make a bunch of pointers `const`

* _function_closure_string: use %u for unsigned

Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>

* _extension_class_string: make indent pointer `const`

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>

---------

Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2024-09-17 03:17:46 +02:00
DanielEScherzer
65b4f22686
Fix some misleading comments about __clone() never being executed (#15926)
For the `Exception`, `ReflectionClass`, and `ReflectionAttribute` classes, the
`__clone()` method is declared to be private, and the implementation has a
comment that it should never be executed. However, the implementation can be
executed by using a `ReflectionMethod`. Fix the comments to instead explain why
the implementation is needed.

[skip ci]
2024-09-17 01:53:30 +02:00
Ilija Tovilo
2fce0bb877
Implement ReflectionProperty::isFinal()
Closes GH-15919
2024-09-16 23:22:52 +02:00
Niels Dossche
1ce07b0957
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15711: SoapClient can't convert BackedEnum to scalar value
  Use get_serialization_string_from_zval() in all encoding functions
  Introduce get_serialization_string_from_zval() and use it in to_xml_string()
2024-09-16 20:51:34 +02:00
Niels Dossche
25289dd08e
Fix GH-15711: SoapClient can't convert BackedEnum to scalar value
Allow SoapClient to use the backing value during response serialization.

Closes GH-15803.
2024-09-16 20:47:36 +02:00
Niels Dossche
ca66a11c36
Use get_serialization_string_from_zval() in all encoding functions 2024-09-16 20:46:52 +02:00
Niels Dossche
56fea5995d
Introduce get_serialization_string_from_zval() and use it in to_xml_string()
For now this new function only returns a copy of the string, but its
functionality will be expanded by later commits.
to_xml_string() now uses this function and the memory management is
simplified as well.
2024-09-16 20:46:52 +02:00
Niels Dossche
55aa5f3ffb
Fix GH-15910: Assertion failure in ext/dom/element.c 2024-09-16 20:06:07 +02:00
Arnaud Le Blanc
c65e042c0b
Fix zend_get_property_info_for_slot() for lazy objects (#15855)
zend_get_property_info_for_slot(obj, slot) assumes that 'slot' belongs to 'obj', but that may not be the case for lazy proxies.

Fortunately, the property info is often already available in path when it is needed.

For other cases, I make zend_get_property_info_for_slot() aware of lazy objects, and add zend_get_property_info_for_slot_self() for cases where the 'slot' is known to belong to the object itself.

Fixes oss-fuzz #71446
2024-09-16 16:58:12 +02:00
Ilija Tovilo
c7397f5131
[skip ci] Fix NEWS section 2024-09-16 14:34:19 +02:00
Ilija Tovilo
d75a289f6f
Implement ReflectionProperty::hasHook[s]
Closes GH-15844
2024-09-16 14:28:41 +02:00
Christoph M. Becker
b438e2b1ed
Merge branch 'PHP-8.3'
* PHP-8.3:
  Run snmp tests in Windows CI, again
2024-09-15 23:15:09 +02:00
Christoph M. Becker
ad11cbc491
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Run snmp tests in Windows CI, again
2024-09-15 23:14:15 +02:00
Christoph M. Becker
b26e610777
Run snmp tests in Windows CI, again
That was broken when CI was moved to GH, since `APPVEYOR_BUILD_FOLDER`
is no longer set; instead we use `GITHUB_WORKSPACE` which has the same
meaning.

Closes GH-15896.
2024-09-15 23:13:54 +02:00
Niels Dossche
ed54d6de49
Fix XML serializer errata: xmlns="" serialization should be allowed
The spec doesn't want to serialize xmlns:foo="", but the description of
the step that checks this does not take into account that xmlns="" must
be allowed. This patch corrects this errata.

Closes GH-15894.
2024-09-15 21:30:53 +02:00
Christoph M. Becker
5121acaa66
Support --with-openssl-argon2 on Windows (GH-15713)
We change the error for ZTS builds to a warning, to not break snapshot
builds which automatically will try to enable OpenSSL password hashing.

We also change some messages to better fit building on Windows.

And of course, we cannot easily check whether `OSSL_set_max_threads()`
is actually available; instead we're looking up the function declaration
in its header file.

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
2024-09-15 17:06:50 +02:00
Peter Kokot
796eba65e7
Autotools: Fix CS in undefined sanitizer check (#15892)
To prevent possible unused warnings turning into false errors.
2024-09-15 15:52:37 +02:00
Ayesh Karunaratne
d5b3ffa762
ext/gd: enable avif tests on GH-Actions (#15850)
When the avif support was first added (GH-7026), php-src did not
use GitHub Actions. When we moved to GitHub Actions for CI, the
`--with-avif` option nor the `libavif-dev` dependencies were not
added.

Cirrus CI still runs the tests, and now that we no longer use
Travis CI, this brings parity to test avif on x64 tests on
GitHub Actions as well.

`libavif-dev` package's x86 builds seem to be missing[^1][^2] on older
Ubuntu versions, so this commit only adds it for x64 builds.

[^1]: https://packages.ubuntu.com/jammy/libavif-dev
[^2]: https://packages.ubuntu.com/noble/libavif-dev
2024-09-15 14:57:47 +02:00
Máté Kocsis
274ae05c4e
Merge branch 'PHP-8.3'
* PHP-8.3:
  Add missing returns in ext/date for PHP 8.3+ (#15735)
2024-09-14 22:15:49 +02:00
Máté Kocsis
cb69900407
Add missing returns in ext/date for PHP 8.3+ (#15735)
Issues originally found in #15598
2024-09-14 22:15:22 +02:00
Gina Peter Bnayard
2513258a2b ext/phar: Voidify flush function as it always returns EOL 2024-09-14 14:00:46 +01:00
Gina Peter Bnayard
4f9fdf841e ext/phar: Move variable to inner scope 2024-09-14 14:00:46 +01:00
Gina Peter Bnayard
290fb920f2 ext/phar: Mark constant string as static const 2024-09-14 14:00:46 +01:00
Gina Peter Bnayard
3f1a4441bd ext/standard: Make char* of php_stristr() const 2024-09-14 14:00:46 +01:00
Gina Peter Bnayard
b75c79ee1d ext/phar: Use bool instead of int 2024-09-14 14:00:46 +01:00
Gina Peter Bnayard
03e2cfdad1 ext/phar: Refactor flushing of archive to only take string stub file 2024-09-14 14:00:46 +01:00
Peter Kokot
888eb370cf
Fix -Wundef/C4668 warnings (#15853)
- ZTS is either undefined or defined (to 1)
- PHP_WIN32 is either undefined or defined (to 1)
- HAVE_LIBEDIT is either undefined or defined (to 1)
2024-09-14 11:28:32 +02:00
Ilija Tovilo
f6a232cce2
Fix missing deps in macos arm build (GH-15881) 2024-09-14 00:53:24 +02:00
Ilija Tovilo
99bee73325
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GA macOS brew warnings
2024-09-13 23:14:55 +02:00
Ilija Tovilo
a08d326941
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GA macOS brew warnings
2024-09-13 23:10:19 +02:00
Ilija Tovilo
664e039069
Fix GA macOS brew warnings
These pollute the job overview.

Closes GH-15877
2024-09-13 23:10:08 +02:00
Niels Dossche
e7b022ea17
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15868: Assertion failure in xml_parse_into_struct after exception
  Fix GH-15868: Assertion failure in xml_parse_into_struct after exception
2024-09-13 20:02:00 +02:00
Niels Dossche
778bfce533
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15868: Assertion failure in xml_parse_into_struct after exception
2024-09-13 20:01:53 +02:00
Niels Dossche
6c82ca2182
Fix GH-15868: Assertion failure in xml_parse_into_struct after exception
Upon unwinding from an exception, the parser state is not stable, we
should not continue updating the values if an exception was thrown.

Closes GH-15879.
2024-09-13 20:01:44 +02:00
Niels Dossche
ac8db36543
Fix GH-15868: Assertion failure in xml_parse_into_struct after exception
Upon unwinding from an exception, the parser state is not stable, we
should not continue updating the values if an exception was thrown.

Closes GH-15879.
2024-09-13 19:59:41 +02:00
Ilija Tovilo
5e7a1cc818
Merge branch 'PHP-8.3'
* PHP-8.3:
  Mark some phar tests as flaky on macOS
2024-09-13 18:14:23 +02:00
Ilija Tovilo
5b2d80bc79
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Mark some phar tests as flaky on macOS
2024-09-13 18:14:14 +02:00
Ilija Tovilo
4e12189604
Mark some phar tests as flaky on macOS
Fixes GH-15748
Closes GH-15876
2024-09-13 18:13:10 +02:00
Gina Peter Banyard
f756b96e06
Make CSV deprecation less annoying to deal with (#15569) 2024-09-13 15:07:26 +01:00
tekimen
e73a855976
[skip ci] Add EXTENSIONS for @youkidearitai in mbstring (#15874) 2024-09-13 05:46:08 -07:00
Christoph M. Becker
aa34950344
[skip ci] Update UPGRADING wrt Deprecate GET/POST sessions RFC (#15865)
This RFC[1] has already been implemented via its respective PR[2], so
we add this information to UPGRADING.

[1] <https://wiki.php.net/rfc/deprecate-get-post-sessions>
[2] <https://github.com/php/php-src/pull/13578>
2024-09-13 12:15:09 +01:00
Derick Rethans
bab5c4a7ac
Merge branch 'PHP-8.3' 2024-09-13 11:05:47 +01:00
Derick Rethans
9185255b83
Merge branch 'PHP-8.2' into PHP-8.3 2024-09-13 11:05:24 +01:00
Derick Rethans
fecad54d74
Backport fix from PHP 8.3: The exception handler already takes care of destroying the return value 2024-09-13 11:04:45 +01:00
Niels Dossche
cd232ed328
Fix short-lived phar regression
Regressed in 1facbc385a
The macro caused the value to be read over and over, but the change to
a variable makes the condition not work like before. Just inline the
read.
2024-09-12 23:16:49 +02:00
Niels Dossche
9f0138babe
Merge branch 'PHP-8.3'
* PHP-8.3:
  Update test for changed error message format in libxml 2.13
2024-09-12 23:11:28 +02:00
Niels Dossche
6f975a271f
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update test for changed error message format in libxml 2.13
2024-09-12 23:11:23 +02:00