1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

132508 Commits

Author SHA1 Message Date
Máté Kocsis 0ce4f91d73 Fix test after reverted commit 2023-07-03 16:49:45 +02:00
Máté Kocsis 4db4f0ba00 Display the readonly modifier for readonly classes 2023-07-03 16:02:25 +02:00
Máté Kocsis 3c6590a391 Add support for extending multiple interfaces in the manual
After https://github.com/php/phd/pull/75/
2023-07-03 16:02:25 +02:00
BohwaZ ddd9a08f56 [RFC] Transition SQLite3 to exceptions (#11058)
* Deprecate warnings in SQLite3, change returned exception class to SQLite3Exception

RFC: https://wiki.php.net/rfc/sqlite3_exceptions

Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2023-07-03 14:30:52 +01:00
Máté Kocsis 9f4bd3040d Revert "Remove name field from the zend_constant struct (#10954)"
This reverts commit f42992f580.

Fix GH-11423
2023-07-03 15:16:24 +02:00
Máté Kocsis 45a3f178dc Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs

Closes GH-10170
2023-07-03 11:17:08 +02:00
Máté Kocsis d7ab0ff0c8 Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs 2023-07-03 08:32:58 +02:00
Niels Dossche b2a54bc6af Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11300: license issue: restricted unicode license headers
2023-07-01 22:03:08 +02:00
Niels Dossche 297fec099e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11300: license issue: restricted unicode license headers
2023-07-01 21:56:40 +02:00
Niels Dossche ee42621ff6 Fix GH-11300: license issue: restricted unicode license headers
Closes GH-11572.
2023-07-01 21:55:21 +02:00
Anatol Belski 775bc49700 Merge branch 'PHP-8.2'
* PHP-8.2:
  NEWS: Add note for #11298
  NEWS: Add note for #11298
2023-07-01 18:58:18 +02:00
Anatol Belski 4e8b1ddc53 NEWS: Add note for #11298
[ci skip]

Signed-off-by: Anatol Belski <ab@php.net>
2023-07-01 18:57:46 +02:00
Anatol Belski abc5ddb182 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  NEWS: Add note for #11298
2023-07-01 18:57:09 +02:00
Anatol Belski 928fc68c9e NEWS: Add note for #11298
[ci skip]

Signed-off-by: Anatol Belski <ab@php.net>
2023-07-01 18:56:07 +02:00
Anatol Belski 292e10b14b fileinfo: Add test for xz type
Ref: #11298

Signed-off-by: Anatol Belski <ab@php.net>
2023-07-01 18:37:53 +02:00
Anatol Belski d6c9a06bcd Merge branch 'PHP-8.2'
* PHP-8.2:
  fileinfo: Backport xz detection patch
  fileinfo: Backport xz detection fix
2023-07-01 18:03:47 +02:00
Anatol Belski 97f0d97d2a fileinfo: Backport xz detection patch
Upstream: https://github.com/file/file/commit/9b0459afab309a82aa4e46f73a4e50dd641f3d39

Fixes: #11298

Signed-off-by: Anatol Belski <ab@php.net>
2023-07-01 18:02:46 +02:00
Anatol Belski fc165ddc61 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  fileinfo: Backport xz detection fix
2023-07-01 18:00:25 +02:00
Anatol Belski 86f79b299e fileinfo: Backport xz detection fix
Upstream: https://github.com/file/file/commit/9b0459afab309a82aa4e46f73a4e50dd641f3d39

Fixes: #11298

Signed-off-by: Anatol Belski <ab@php.net>
2023-07-01 17:58:38 +02:00
Máté Kocsis 3906bccc00 Add support for typed class constants in stubs 2023-07-01 11:50:04 +02:00
Niels Dossche 78d98e50c4 Fix GH-11567: mb_str_pad causes access violation
When not providing a pad string, *and* not having other defaulted
arguments, the function would crash on a NULL pad zend_string*.
Despite testing with an empty pad string, the issue wasn't found because
when using named arguments the pad string *is* filled in.
2023-06-30 16:40:43 +02:00
Bob Weinand 9fe33c8458 Merge branch 'PHP-8.2' 2023-06-30 15:20:55 +02:00
Bob Weinand cad47be8b6 Fix GH-11548 (Argument corruption when calling XMLReader::open or XMLReader::XML non-statically with observer active) 2023-06-30 15:18:37 +02:00
Alexander M. Turek 5d5664f72f [skip ci] Fix typo (#11558) 2023-06-30 12:59:33 +02:00
Ilija Tovilo 28117d718f Merge branch 'PHP-8.2'
* PHP-8.2:
  Attempt to fix gh11498.phpt on MSAN
2023-06-30 09:42:46 +02:00
Ilija Tovilo 04cd8859dd Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Attempt to fix gh11498.phpt on MSAN
2023-06-30 09:42:34 +02:00
Ilija Tovilo 07dd0c80a8 Attempt to fix gh11498.phpt on MSAN
The issue might be that due to slow instrumentation the process might end before
we get to add it to the processes list. If the SIGCHLD handler executes before
adding the process to the list it will never be removed again.
2023-06-30 09:39:19 +02:00
Tim Düsterhus 49ef6e209d RFC: Add #[Override] attribute (#9836)
* Add #[Override] attribute

* Move #[\Override] tests into Zend/tests/attributes/override/

* Check `check_only` before removing `ZEND_ACC_OVERRIDE`

* NEWS/UPGRADING for #[\Override]
2023-06-29 20:23:53 +02:00
Remi Collet b406f7c67a zip extension version 1.22.1
- add ZipArchive::FL_OPEN_FILE_NOW to open the file when added
  instead of waiting for archive to be closed
2023-06-29 15:21:15 +02:00
Yurun 071bf46573 Fix incorrect function/method names in DBG_ENTER() (#11554) 2023-06-29 13:13:55 +01:00
Ilija Tovilo ee4ebab5a9 [skip ci] Improve inheritance checked comment
zend_can_early_bind() might have already detected that the methods are
incompatible. In that case the class is still early bound, but must compile
error when inheritance is performed. Thus it is only safe to skip compatibility
checks when zend_can_early_bind() has succeeded.
2023-06-29 09:35:42 +02:00
Ilija Tovilo 5723fa2275 [skip ci] Document do_inheritance_check_on_method_ex() check_only and check params
These are quite confusingly named.
2023-06-29 09:18:59 +02:00
Ilija Tovilo 45ffa773c8 Merge branch 'PHP-8.2'
* PHP-8.2:
  xfail socket zerocopy test on Cirrus + arm
2023-06-29 08:49:07 +02:00
Ilija Tovilo 838f6bffff xfail socket zerocopy test on Cirrus + arm
Closes GH-11553
2023-06-29 08:48:48 +02:00
Ilija Tovilo ff8c2902be Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix serialization of RC1 objects appearing in object graph twice
2023-06-28 21:17:24 +02:00
Ilija Tovilo 6b9d295674 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix serialization of RC1 objects appearing in object graph twice
2023-06-28 21:16:51 +02:00
Ilija Tovilo d7d36692fd Fix serialization of RC1 objects appearing in object graph twice
Previously, if an object had RC1 it would never be recorded in
php_serialize_data.ht because it was assumed that it could not be encountered
again. This assumption is incorrect though as the object itself may be saved
inside an array with RCn. This results in a new instance of the object, instead
of a second reference to the same object.

This is solved by tracking these objects in php_serialize_data.ht. To retain
performance, track if the current object resides in a potentially nested RCn
array. If not, and if the object is RC1 itself it may be omitted from
php_serialize_data.ht.

Additionally, we may treat the array root itself as RC1 because it may not
appear in the object graph again without recursion. Recursive arrays are still
somewhat broken even with this change, as the tracking of the array only happens
when the reference is encountered, thus resulting in a -> a' -> a' for a self
recursive array a -> a. Recursive arrays have limited support in serialize
anyway, so we ignore this case for now.

Co-authored-by: Dmitry Stogov <dmitry@zend.com>
Co-authored-by: Martin Hoch <martin@littlerobot.de>

Closes GH-11349
Closes GH-11305
2023-06-28 21:15:03 +02:00
Ilija Tovilo 68ef3938f4 Fix missing "Optional parameter before required" deprecation on union null type
The check would only work for the ?type syntax, but not  type|null. Switch to a
check during type compilation instead.

Fixes GH-11488
Closes GH-11497
2023-06-28 20:45:43 +02:00
Ilija Tovilo a94216dcb7 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix mis-compilation of by-reference nullsafe operator
2023-06-28 20:37:25 +02:00
Ilija Tovilo 54dfa86728 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix mis-compilation of by-reference nullsafe operator
2023-06-28 20:36:30 +02:00
Ilija Tovilo dc73b73f8b Fix mis-compilation of by-reference nullsafe operator
Fixes oss-fuzz #60011
Closes GH-11540

Co-authored-by: Dmitry Stogov <dmitry@zend.com>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2023-06-28 20:35:29 +02:00
Ilija Tovilo 73cf12d6ac Fix ext/zip arginfo.h 2023-06-28 19:10:00 +02:00
Remi Collet a2f75eb56c [ci skip] ZipArchive::FL_RECOMPRESS constant is deprecated (doc) 2023-06-28 14:44:33 +02:00
Remi Collet d8dd72fc31 The ZipArchive::FL_RECOMPRESS constant is deprecated 2023-06-28 14:28:09 +02:00
Niels Dossche 864c3073b6 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11522: PHP version check fails with '-' separator
2023-06-27 18:29:44 +02:00
Niels Dossche ac60c5c70c Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11522: PHP version check fails with '-' separator
2023-06-27 18:29:09 +02:00
SVGAnimate 3483229199 Fix GH-11522: PHP version check fails with '-' separator
Remove php version suffix from '-' separator.

Closes GH-11524.
2023-06-27 18:28:04 +02:00
Niels Dossche f37884215c [ci skip] UPGRADING 2023-06-27 18:04:11 +02:00
nielsdos b4917d8a19 [ci skip] Update UPGRADING.INTERNALS 2023-06-27 18:01:21 +02:00
nielsdos 941a7e59d9 Avoid allocation when getting the node content, if possible
Closes GH-11543.
2023-06-27 18:00:44 +02:00