Skip to content
forked from php/php-src

sync #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 268 commits into from
Jun 15, 2023
Merged

sync #22

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
268 commits
Select commit Hold shift + click to select a range
baa07f3
Fix GH-11180: hash_file() appears to be restricted to 3 arguments
nielsdos May 6, 2023
e673056
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 7, 2023
f6e296d
Merge branch 'PHP-8.2'
nielsdos May 7, 2023
8533856
Narrow bool return types to true when possible
kocsismate May 7, 2023
281669a
Add support for true standalone type when generating methodsynopsis
kocsismate May 7, 2023
37e6594
Fix gmp_long/gmp_ulong typedef warning on Windows x86 (#11112)
mvorisek May 7, 2023
78ec64a
Fix use-of-uninitialized value in phar_object.c
iluuu1994 May 7, 2023
b71a961
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 8, 2023
38cf52d
Merge branch 'PHP-8.2'
iluuu1994 May 8, 2023
06fe9ff
Fix use-of-undefined in zend_fiber_object_gc of ex->call
iluuu1994 May 8, 2023
173680a
Merge branch 'PHP-8.2'
iluuu1994 May 9, 2023
acc9406
Remove unnecessary NULL assignments after ecalloc in streams (#11209)
nielsdos May 9, 2023
6ba0b06
Fix GH-8426: make test fail while soap extension build
nielsdos May 8, 2023
44491d1
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 9, 2023
63a84a2
Merge branch 'PHP-8.2'
nielsdos May 9, 2023
175ff60
Fix compilation error on old GCC versions
ingamedeo May 9, 2023
6692477
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 10, 2023
7304b56
Merge branch 'PHP-8.2'
iluuu1994 May 10, 2023
975d28e
Fix GH-11222: foreach by-ref may jump over keys during a rehash
bwoebi May 10, 2023
53558ff
Merge branch 'PHP-8.1' into PHP-8.2
bwoebi May 10, 2023
0787247
Merge branch 'PHP-8.2'
bwoebi May 10, 2023
09dd3e3
Narrow some more return types to true
kocsismate May 10, 2023
8f66b67
Fix compilation for PHP 8.1
iluuu1994 May 10, 2023
5e962f6
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 10, 2023
5820528
Merge branch 'PHP-8.2'
iluuu1994 May 10, 2023
ad747d9
[skip ci] Remove NEWS entry for reverted change in PHP 8.1
iluuu1994 May 11, 2023
c47c64e
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 11, 2023
6a2d041
Merge branch 'PHP-8.2'
iluuu1994 May 11, 2023
12c30a8
[skip ci] Add missing --no-progress flag to ARM build
iluuu1994 May 11, 2023
c71cf06
Merge branch 'PHP-8.2'
iluuu1994 May 11, 2023
0a04c00
Fix potential NULL pointer access in zend_fiber_object_gc
iluuu1994 May 11, 2023
8d8cfe2
Merge branch 'PHP-8.2'
iluuu1994 May 11, 2023
730f32b
Keep the orig_path for xport stream
iamluc Apr 20, 2023
e349913
Fix delayed early binding class redeclaration error
iluuu1994 May 10, 2023
e0af7c3
Merge branch 'PHP-8.2'
iluuu1994 May 12, 2023
7b76848
Fix GH-10834: exif_read_data() cannot read smaller stream wrapper chu…
nielsdos Mar 24, 2023
d369a77
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 12, 2023
2fa8473
Merge branch 'PHP-8.2'
nielsdos May 12, 2023
1029537
Fix GH-10461: Postpone FPM child freeing in event loop
bukka Apr 15, 2023
bda28eb
Merge branch 'PHP-8.1' into PHP-8.2
bukka May 13, 2023
7034263
Merge branch 'PHP-8.2'
bukka May 13, 2023
e8a836e
Expose JSON internal function to escape string
bukka Apr 10, 2023
5e64ead
Fix bug #64539: FPM status - query_string not properly JSON encoded
bukka Apr 10, 2023
90553af
Merge branch 'PHP-8.1' into PHP-8.2
bukka May 13, 2023
a225f6a
Merge branch 'PHP-8.2'
bukka May 13, 2023
4294e8d
FPM: Fix memory leak for invalid primary script file handle
bukka Apr 16, 2023
1129046
Merge branch 'PHP-8.1' into PHP-8.2
bukka May 14, 2023
03f64b7
Merge branch 'PHP-8.2'
bukka May 14, 2023
ac41608
Fix -Wenum-int-mismatch warning in ext/json/php_json_encoder.h
iluuu1994 May 14, 2023
6bd5464
Cacheline demote to improve performance (#11101)
May 15, 2023
0600f51
Implement delayed early binding for classes without parents
iluuu1994 May 10, 2023
aa553af
Fix segfault in mb_strrpos/mb_strripos with ASCII encoding and negati…
iluuu1994 May 10, 2023
c5a623b
Added negative offset test for mb_strrpos
rgeraads May 10, 2023
6408fb2
Merge branch 'PHP-8.2'
iluuu1994 May 15, 2023
aae39fe
Fix #9483: Fix autoconf warnings due to old libtool (#11207)
petk May 15, 2023
e35cd34
Fix assertion warning message when no description is provided
Girgias May 16, 2023
80c8ca9
Use uint32_t for variable storing ZEND_NUM_ARGS()
Girgias May 16, 2023
97e29be
Use shared, immutable array for return value of mb_list_encodings
alexdowad Apr 22, 2023
3ab10da
Take order of candidate encodings into account when guessing text enc…
alexdowad Apr 30, 2023
7914b8c
Use pakutoma's encoding check functions for mb_detect_encoding even i…
alexdowad May 11, 2023
727e26f
Fix #97836 and #81705: Segfault / type confusion in concat_function
nielsdos Dec 4, 2022
bd03c03
Allow CTE on more CTE safe functions (#10771)
mvorisek May 16, 2023
e31fe11
[skip ci] Mark frequently failing fpm test as XFAIL
iluuu1994 May 17, 2023
69d41cc
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 17, 2023
8d0345d
Merge branch 'PHP-8.2'
iluuu1994 May 17, 2023
aa061cd
Fix FPM status json encoded value test
bukka May 19, 2023
3769505
Merge branch 'PHP-8.1' into PHP-8.2
bukka May 19, 2023
e5d46b3
Merge branch 'PHP-8.2'
bukka May 19, 2023
1ede313
Fix GH-11274: POST/PATCH request via file_get_contents + stream_conte…
nielsdos May 19, 2023
45897f5
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 19, 2023
afcf97b
Merge branch 'PHP-8.2'
nielsdos May 19, 2023
1fe7dc3
Fix -Wstrict-prototypes warnings in fuzzer SAPI (#11277)
nielsdos May 20, 2023
93fa961
Fix GH-11099: Generating phar.php during cross-compile can't be done
peter279k May 15, 2023
ffae350
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 20, 2023
a94fe87
Merge branch 'PHP-8.2'
nielsdos May 20, 2023
548e061
FPM: refactor fpm_php_get_string_from_table() to better match usage (…
Girgias May 20, 2023
c717c79
Combine CJK encoding conversion code in a single source file
alexdowad Apr 14, 2023
73633bf
Optimize conversion of SJIS-2004 text to Unicode
alexdowad Apr 18, 2023
175154d
Optimize conversion of CP932 text to Unicode
alexdowad Apr 18, 2023
245daed
Move kana translation tables to mbfilter_cjk.c
alexdowad Apr 22, 2023
f337c92
Test mb_strlen for all text encodings supported by mbstring
alexdowad May 16, 2023
8e6be14
Fix problem with CP949 conversion when 0xC9 precedes byte lower than …
alexdowad May 16, 2023
18ca489
Convert mbfilter_conv{,_r}_map_tbl to return bool
alexdowad May 21, 2023
03b163b
Remove unused variable err in mb_send_mail() (#11285)
nielsdos May 21, 2023
c230aa9
Correctly handle multiple constants in typed declaration
nikic May 20, 2023
5c74164
Fix string coercion for $a .= $a (#11296)
iluuu1994 May 22, 2023
7790ee8
Fix concat_function use-after-free on out-of-memory error (#11297)
iluuu1994 May 22, 2023
5cad1a7
Fix GH-11245 (In some specific cases SWITCH with one default statemen…
nielsdos May 16, 2023
f656344
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 22, 2023
24ff7ee
Merge branch 'PHP-8.2'
nielsdos May 22, 2023
a2af8ac
Fix the JIT buffer relocation failure at the corner case (#11266)
LoongT4o May 23, 2023
f9117eb
Fix GH-11281: DateTimeZone::getName() does not include seconds in offset
nielsdos May 19, 2023
caab608
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 23, 2023
505a30c
Merge branch 'PHP-8.2'
nielsdos May 23, 2023
d5f68b5
PHP-8.2 is now for PHP 8.2.8-dev
adoy May 23, 2023
a05d58d
Merge branch 'PHP-8.2'
adoy May 23, 2023
2f2fd06
PHP-8.1 is now for PHP 8.1.21-dev
ramsey May 23, 2023
f90fd01
Merge branch 'PHP-8.1' into PHP-8.2
ramsey May 23, 2023
f36d09d
Merge branch 'PHP-8.2'
ramsey May 23, 2023
2eee46e
ext/session: pass ini options to extra processes in tests (#11294)
mikhainin May 24, 2023
f5c54fd
Fix access on NULL pointer in array_merge_recursive()
iluuu1994 May 23, 2023
4676d9b
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 24, 2023
ded8b7f
Merge branch 'PHP-8.2'
iluuu1994 May 24, 2023
7c7698f
Fix preg_replace_callback_array() pattern validation
iluuu1994 May 23, 2023
32968f8
Merge branch 'PHP-8.2'
iluuu1994 May 24, 2023
b2ec6c2
Fix exception handling in array_multisort()
iluuu1994 May 23, 2023
0ee4371
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 24, 2023
a59c933
Merge branch 'PHP-8.2'
iluuu1994 May 24, 2023
1c733c8
Use zend_ast_apply in zend_eval_const_expr (#11261)
iluuu1994 May 24, 2023
6267601
Fix allocation loop in zend_shared_alloc_startup()
nielsdos May 23, 2023
bbcf9e7
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 24, 2023
3189a9f
Merge branch 'PHP-8.2'
nielsdos May 24, 2023
0b1d750
Allow arbitrary expressions in static variable initializer
iluuu1994 Aug 11, 2022
5ff244d
[skip ci] Fix linguist-generated for zend_vm_opcodes files
iluuu1994 May 24, 2023
eb7ec15
Use single allocation for indirect values in array_multisort
iluuu1994 May 24, 2023
150825d
[skip ci] Fix release date of PHP 8.2.7
adoy May 25, 2023
04b1bc3
Merge branch 'PHP-8.2'
adoy May 25, 2023
8946b7b
Access violation when ALLOC_FALLBACK fixed
KoudelkaB May 24, 2023
5b8e941
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 25, 2023
adb3d52
Merge branch 'PHP-8.2'
iluuu1994 May 25, 2023
cba335d
Fix GH-11288 and GH-11289 and GH-11290 and GH-9142: DOMExceptions and…
nielsdos May 22, 2023
af72727
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 25, 2023
56b1c11
Merge branch 'PHP-8.2'
nielsdos May 25, 2023
5b033b0
Fix zend_jit_stop_counter_handlers() performance issues with protect_…
iluuu1994 May 25, 2023
2d86e95
Merge branch 'PHP-8.2'
iluuu1994 May 26, 2023
b5a07a7
[skip ci] Fix race condition in readline test
iluuu1994 May 26, 2023
b47a7d4
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 26, 2023
58a191c
Merge branch 'PHP-8.2'
iluuu1994 May 26, 2023
8ed66b4
Add tests for list() in assignment in array literals
iluuu1994 May 25, 2023
fbe6696
Revert "Use zend_ast_apply in zend_eval_const_expr (#11261)"
iluuu1994 May 26, 2023
1dfa277
Fix GCC 12 compilation on riscv64
danog May 25, 2023
350e449
Merge branch 'PHP-8.1' into PHP-8.2
devnexen May 27, 2023
2e4369a
Merge branch 'PHP-8.2'
devnexen May 27, 2023
f249958
[skip ci] Add more patterns to run-tests.php retry list
iluuu1994 May 27, 2023
f735543
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 27, 2023
2d883a6
Merge branch 'PHP-8.2'
iluuu1994 May 27, 2023
b884011
Shrink libxml_doc_props struct (#11326)
nielsdos May 29, 2023
c473787
Fix GH-10234: Setting DOMAttr::textContent results in an empty attrib…
nielsdos Jan 6, 2023
9ff1ea6
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 29, 2023
99ec0c1
Merge branch 'PHP-8.2'
nielsdos May 29, 2023
b495a91
Add string output escaping into zend dump (phpdbg + opcache debug) (#…
SerafimArts May 29, 2023
761b9a4
Fix return value in stub file for DOMNodeList::item
divinity76 May 29, 2023
dfa8987
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 29, 2023
f90962d
Merge branch 'PHP-8.2'
nielsdos May 29, 2023
bce5360
Fix GH-11338: SplFileInfo empty getBasename with more than one slash
nielsdos May 29, 2023
9c59d22
Fix GH-11336: php still tries to unlock the shared memory ZendSem wit…
nielsdos May 29, 2023
154c251
Fix spec compliance error for DOMDocument::getElementsByTagNameNS
nielsdos May 29, 2023
b374ec3
Fix DOMElement::append() and DOMElement::prepend() hierarchy checks
nielsdos May 29, 2023
0e7ad40
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 30, 2023
1ed6868
Merge branch 'PHP-8.2'
nielsdos May 30, 2023
d8102e6
Remove unnecessary tree setting in dom_zvals_to_fragment()
nielsdos May 29, 2023
c6655fb
Implement dom_get_doc_props_read_only()
nielsdos May 29, 2023
c50172e
Fix mb_strlen is wrong length for CP932 when 0x80.
youkidearitai May 29, 2023
c33589e
Merge branch 'PHP-8.1' into PHP-8.2
alexdowad May 30, 2023
6930ef5
Merge branch 'PHP-8.2'
alexdowad May 30, 2023
c6ae7a5
Fix bug GH-11246 cli/get_set_process_title
lucasnetau May 16, 2023
0bf8ecf
Merge branch 'PHP-8.1' into PHP-8.2
iluuu1994 May 31, 2023
bb48f5d
Merge branch 'PHP-8.2'
iluuu1994 May 31, 2023
7812772
Fix GH-11347: Memory leak when calling a static method inside an xpat…
nielsdos May 30, 2023
8126bea
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos May 31, 2023
91fd564
Merge branch 'PHP-8.2'
nielsdos May 31, 2023
82e761e
Fix [-Wenum-int-mismatch] compiler warnings (#11352)
Girgias Jun 1, 2023
1540245
ext/standard/array.c: Optimize min/max functions for int/float (#11194)
Girgias Jun 2, 2023
f8faa8b
Use zval_ptr_dtor_nogc() for callable in ext/xslt (#11356)
nielsdos Jun 2, 2023
79128af
[skip ci] Update release process to publish php-keyring.gpg in web-php
adoy Jun 2, 2023
810507a
http_fopen_wrapper: fix [-Wanalyzer-deref-before-check]
Girgias Jun 2, 2023
13ad8ef
memory stream: fix [-Wanalyzer-deref-before-check]
Girgias Jun 2, 2023
c5d7264
Fix file descriptor check
Girgias Jun 2, 2023
ce724d1
Assert zend_constant exist
Girgias Jun 2, 2023
c3f0797
Implement iteration cache, item cache and length cache for node list …
nielsdos Jun 2, 2023
5fae4b5
Struct-pack spl_dllist_object
nielsdos Jun 3, 2023
c6bffff
Remove dead code from sxe_get_element_by_name()
nielsdos Jun 2, 2023
7951279
Remove double class entry variable
nielsdos Jun 2, 2023
47c277b
Use xmlStrEqual() instead of !xmlStrCmp()
nielsdos Jun 2, 2023
ed097e3
No need for the double name pointer
nielsdos Jun 2, 2023
3da4156
Switch DOMNodeList::item() and DOMNamedNodeMap::item() to fast ZPP (#…
nielsdos Jun 4, 2023
b1d8e24
Fix bug #67440: append_node of a DOMDocumentFragment does not reconci…
nielsdos Jun 3, 2023
23f7002
Fix bug #81642: DOMChildNode::replaceWith() bug when replacing a node…
nielsdos Jun 3, 2023
0e34ac8
Fix bug #77686: Removed elements are still returned by getElementById
nielsdos Jun 4, 2023
5b79c53
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos Jun 4, 2023
e8fb0ed
Merge branch 'PHP-8.2'
nielsdos Jun 4, 2023
a720268
Use uint32_t for the number of nodes (#11371)
nielsdos Jun 5, 2023
9ce6980
Use known zend_string pointer to check for equality instead of C stri…
Girgias Jun 5, 2023
16a63d7
ext/pgsql: php_pgsql_convert converts E_NOTICE to TypeError/ValueErro…
devnexen May 13, 2023
61e1f8a
Let closure created from magic method accept named parameters
nielsdos Jun 3, 2023
50fdad8
Set DOMAttr::$value without expanding entities
tstarling Dec 19, 2022
74910b1
Factor out dom_remove_all_children()
tstarling Dec 22, 2022
ee68c22
Don't add 1 when calling xmlNodeSetContent()
tstarling Dec 22, 2022
076ddf2
Also avoid entity expansion in DOMAttr::$nodeValue
tstarling Dec 22, 2022
0cc028c
Changelog notes for DOMAttr value and nodeValue properties
tstarling Dec 22, 2022
ab77485
Improve test DOMAttr_entity_expansion.phpt
tstarling Jun 5, 2023
99fa740
Use common function for TypeError on illegal offset access (#10544)
Girgias Jun 6, 2023
8f06feb
Fixed deoptimization info for interrupt handler
dstogov Jun 6, 2023
724e64f
Merge branch 'PHP-8.1' into PHP-8.2
dstogov Jun 6, 2023
376b1ef
Merge branch 'PHP-8.2'
dstogov Jun 6, 2023
a02f7f2
Use more appropriate types for php_array_walk() function
Girgias Jun 6, 2023
e56904a
Disable old libxml2 hack if the version does not suffer from the bug …
nielsdos Jun 6, 2023
5b430a2
Update NEWS for PHP 8.3.0alpha1
bukka Jun 6, 2023
cced0dd
Fix test failure for init_fcall_003.phpt without opcache
nielsdos Jun 5, 2023
1de5c50
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos Jun 6, 2023
919f27b
Merge branch 'PHP-8.2'
nielsdos Jun 6, 2023
ac4254a
Fix missing randomness check and insufficient random bytes for SOAP H…
nielsdos Apr 16, 2023
0572448
Fix GH-11382 add missing hash header for bin2hex
remicollet Jun 6, 2023
b720ab9
Update NEWS
adoy Jun 6, 2023
a5b8bfc
Merge branch 'PHP-8.0' into PHP-8.1
adoy Jun 6, 2023
5604f7a
Update NEWS
adoy Jun 6, 2023
38e4e58
Merge branch 'PHP-8.1' into PHP-8.2
adoy Jun 6, 2023
269d6c5
Update NEWS
adoy Jun 6, 2023
c790373
Merge branch 'PHP-8.2'
adoy Jun 6, 2023
938ebb3
Add example commit message to release process doc
ramsey Jun 6, 2023
ca19051
Add PHP 8.3 to release process doc; remove 7.4
ramsey Jun 6, 2023
0561783
ensure session.sid_length have proper value for test
remicollet Jun 6, 2023
8e01517
[ci skip] Fix inaccurate comment
nielsdos Jun 7, 2023
6e04050
Remove redundant assignment on nodep->ns
nielsdos Jun 5, 2023
bde6f2a
Fix initial array size in `gc_status()` (#11393)
realFlowControl Jun 7, 2023
79d024a
Allow final modifier when using a method from a trait (#11394)
nielsdos Jun 7, 2023
06d6873
Keep consistent EG(current_execute_data) after return from generator …
dstogov Jun 8, 2023
42619b2
Merge branch 'PHP-8.1' into PHP-8.2
dstogov Jun 8, 2023
962a777
Merge branch 'PHP-8.2'
dstogov Jun 8, 2023
d5ad751
More usage of known zend_str instead of C string (#11381)
Girgias Jun 8, 2023
a6911cb
Suppress warning when the test run under non-root (#11400)
mikhainin Jun 8, 2023
50b4df1
Get rid of return value for php_libxml_unregister_node() (#11398)
nielsdos Jun 8, 2023
a38e3c9
Fix #79700: Bad performance with namespaced nodes due to wrong libxml…
nielsdos Jun 5, 2023
709540c
Fix add/remove observer API with multiple observers installed
bwoebi Jun 9, 2023
95e6ce6
Merge branch 'PHP-8.2'
bwoebi Jun 9, 2023
fd09728
Fix bug GH-9356: Incomplete SAN validation of IPv6 address
lucasnetau Apr 28, 2023
58141f0
Merge branch 'PHP-8.1' into PHP-8.2
bukka Jun 9, 2023
45eae90
Merge branch 'PHP-8.2'
bukka Jun 9, 2023
3fc013b
Fix CS and checking for IPv6 SAN verify
bukka Jun 9, 2023
d687a1b
Merge branch 'PHP-8.1' into PHP-8.2
bukka Jun 9, 2023
981f01e
Merge branch 'PHP-8.2'
bukka Jun 9, 2023
f2d673f
Fix #70359 and #78577: segfaults with DOMNameSpaceNode
nielsdos Jun 8, 2023
2cbb0c0
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos Jun 9, 2023
30c5ae4
Merge branch 'PHP-8.2'
nielsdos Jun 9, 2023
d22d0e2
Implement GH-8641: STREAM_NOTIFY_COMPLETED over HTTP never emitted
nielsdos Feb 4, 2023
49fbbea
Fix GH-10406: fgets on a redis socket connection fails on PHP 8.3
bukka Jun 10, 2023
e309fd8
Fix lifetime issue with getAttributeNodeNS()
nielsdos Jun 10, 2023
10d94ac
Fix "invalid state error" with cloned namespace declarations
nielsdos Jun 11, 2023
a8a3b99
Fix GH-11433: Unable to set CURLOPT_ACCEPT_ENCODING to NULL
nielsdos Jun 12, 2023
c160693
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos Jun 13, 2023
18f2f0a
Merge branch 'PHP-8.2'
nielsdos Jun 13, 2023
5c78980
Fix GH-11406: segfault with unpacking and magic method closure
nielsdos Jun 9, 2023
dd8514a
ext/pgsql: adding pg_set_error_context_visibility.
devnexen Jun 7, 2023
ec3daea
ext/pdo_pgsql: connection status update to distinguish from truly bad…
devnexen Jun 12, 2023
4fcb3e0
Fix cross-compilation check in phar generation for FreeBSD
peter279k Jun 12, 2023
a9c6b84
Merge branch 'PHP-8.1' into PHP-8.2
nielsdos Jun 13, 2023
1a5a537
Merge branch 'PHP-8.2'
nielsdos Jun 13, 2023
38b5e94
[ci skip] Add myself to CODEOWNERS for dom and libxml (#11449)
nielsdos Jun 13, 2023
85a4a80
ext/imap: Refactor + Update to modern property write API (#11415)
Girgias Jun 14, 2023
96ea06a
Add test for GH-11423
kocsismate Jun 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ arm_task:
-d opcache.jit=function
-P -q -x -j2
-g FAIL,BORK,LEAK,XLEAK
--no-progress
--offline
--show-diff
--show-slow 1000
Expand All @@ -397,6 +398,7 @@ arm_task:
-d opcache.jit=tracing
-P -q -x -j2
-g FAIL,BORK,LEAK,XLEAK
--no-progress
--offline
--show-diff
--show-slow 1000
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Collapse generated files within a pull request.
**/*_arginfo.h linguist-generated
/Zend/zend_vm_execute.h linguist-generated
/Zend/zend_vm_opcodes.{h,c} linguist-generated
/Zend/zend_vm_opcodes.[ch] linguist-generated

# The OSS fuzz files are bunary
/ext/date/tests/ossfuzz*.txt binary
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
/ext/curl @adoy
/ext/date @derickr
/ext/dba @Girgias
/ext/dom @nielsdos
/ext/ffi @dstogov
/ext/gmp @Girgias
/ext/imap @Girgias
/ext/json @bukka
/ext/libxml @nielsdos
/ext/mbstring @alexdowad
/ext/opcache @dstogov @iluuu1994
/ext/openssl @bukka
Expand All @@ -26,6 +28,7 @@
/ext/session @Girgias
/ext/sockets @devnexen
/ext/spl @Girgias
/ext/standard @bukka
/main @bukka
/sapi/fpm @bukka
/Zend @iluuu1994
Expand Down
52 changes: 51 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.3.0alpha1
?? ??? ????, PHP 8.3.0alpha2

- Core:
. Fix GH-11388 (Allow "final" modifier when importing a method from a trait).
(nielsdos)
. Fixed bug GH-11406 (segfault with unpacking and magic method closure).
(nielsdos)

- DOM:
. Fix #79700 (wrong use of libxml oldNs leads to performance problem).
(nielsdos)
. Fix #77894 (DOMNode::C14N() very slow on generated DOMDocuments even after
normalisation). (nielsdos)

- Streams:
. Implement GH-8641 (STREAM_NOTIFY_COMPLETED over HTTP never emitted).
(nielsdos, Jakub Zelenka)
. Fix bug GH-10406 (fgets on a redis socket connection fails on PHP 8.3).
(Jakub Zelenka)

08 Jun 2023, PHP 8.3.0alpha1

- CLI:
. Added pdeathsig to builtin server to terminate workers when the master
Expand Down Expand Up @@ -35,10 +55,21 @@ PHP NEWS
has inherited it from its parent). (ilutov)
. Fix bug GH-11154 (Negative indices on empty array don't affect next chosen
index). (ColinHDev)
. Fix bug GH-8846 (Implement delayed early binding for classes without
parents). (ilutov)
. Fix bug #79836 (Segfault in concat_function). (nielsdos)
. Fix bug #81705 (type confusion/UAF on set_error_handler with concat
operation). (nielsdos)
. Fix GH-11348 (Closure created from magic method does not accept named
arguments). (nielsdos)

- Date:
. Implement More Appropriate Date/Time Exceptions RFC. (Derick)

- DOM:
. Fix bug GH-8388 (DOMAttr unescapes character reference). (Tim Starling)
. Fix bug GH-11308 (getElementsByTagName() is O(N^2)). (nielsdos)

- Exif:
. Removed unneeded codepaths in exif_process_TIFF_in_JPEG(). (nielsdos)

Expand Down Expand Up @@ -115,6 +146,12 @@ PHP NEWS
. Added memfd api usage, on Linux, for zend_shared_alloc_create_lock()
to create an abstract anonymous file for the opcache's lock. (Max Kellermann)

- OpenSSL:
. Added OPENSSL_CMS_OLDMIMETYPE and PKCS7_NOOLDMIMETYPE contants to switch
between mime content types. (Daniel Kesselberg)
. Fixed GH-11054: Reset OpenSSL errors when using a PEM public key.
(Florian Moser)

- PCNTL:
. SA_ONSTACK is now set for pcntl_signal. (Kévin Dunglas)
. Added SIGINFO constant. (David Carlier)
Expand All @@ -126,6 +163,11 @@ PHP NEWS
. pg_cancel use thread safe PQcancel api instead. (David Carlier)
. pg_trace new PGSQL_TRACE_SUPPRESS_TIMESTAMPS/PGSQL_TRACE_REGRESS_MODE
contants support. (David Carlier)
. pg_set_error_verbosity adding PGSQL_ERRORS_STATE constant. (David Carlier)
. pg_convert/pg_insert E_WARNING on type errors had been converted to
ValueError/TypeError exceptions. (David Carlier)
. Added pg_set_error_context_visibility to set the context's visibility
within the error messages. (David Carlier)

- Phar:
. Fix memory leak in phar_rename_archive(). (stkeke)
Expand All @@ -152,6 +194,10 @@ PHP NEWS
. Fix Segfault when using ReflectionFiber suspended by an internal function.
(danog)

- SAPI:
. Fixed GH-11141 (Could not open input file: should be sent to stderr).
(nielsdos)

- Sockets:
. Added SO_ATTACH_REUSEPORT_CBPF socket option, to give tighter control
over socket binding for a cpu core. (David Carlier)
Expand Down Expand Up @@ -184,10 +230,14 @@ PHP NEWS
. Fix GH-11010 (parse_ini_string() now preserves formatting of unquoted
strings starting with numbers when the INI_SCANNER_TYPED flag is
specified). (ilutov)
. Fix GH-10742 (http_response_code emits no error when headers were already
sent). (NattyNarwhal)

- Streams:
. Fixed bug #51056: blocking fread() will block even if data is available.
(Jakub Zelenka)
. Added storing of the original path used to open xport stream.
(Luc Vieillescazes)

- XSLTProcessor:
. Fixed bug #69168 (DomNode::getNodePath() returns invalid path). (nielsdos)
Expand Down
22 changes: 22 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ PHP 8.3 UPGRADE NOTES
property to the class directly without traits.
. Assigning a negative index n to an empty array will now make sure that the
next index is n+1 instead of 0.
. Static variable initializers can now contain arbitrary expressions.
RFC: https://wiki.php.net/rfc/arbitrary_static_variable_initializers

- DOM:
. Assignment to DOMAttr::$value and DOMAttr::$nodeValue no longer expands
entities in the new value.

- FFI:
. C functions that have a return type of void now return null instead of
Expand All @@ -56,6 +62,8 @@ PHP 8.3 UPGRADE NOTES
RFC: https://wiki.php.net/rfc/readonly_amendments
. Class, interface, trait, and enum constants now support type
declarations. RFC: https://wiki.php.net/rfc/typed_class_constants
. Closures created from magic methods can now accept named arguments.
. The final modifier may now be used when using a method from a trait.

- Posix
. posix_getrlimit() now takes an optional $res parameter to allow fetching a
Expand All @@ -64,6 +72,10 @@ PHP 8.3 UPGRADE NOTES
. posix_ttyname() now raises type warnings for integers following the usual ZPP semantics
and value warnings for invalid file descriptor integers.

- Streams
. Streams can now emit the STREAM_NOTIFY_COMPLETED notification. This was previously
not implemented.

========================================
3. Changes in SAPI modules
========================================
Expand Down Expand Up @@ -144,6 +156,8 @@ PHP 8.3 UPGRADE NOTES
. pg_fetch_object now raises a ValueError instead of an Exception when the constructor_args
argument is non empty with the class not having constructor.
. pg_insert now raises a ValueError instead of a WARNING when the table specified is invalid.
. pg_insert and pg_convert raises a ValueError or a TypeError instead of a WARNING when the
value/type of a field does not match properly with a PostGreSQL's type.

- Standard:
. E_NOTICEs emitted by unserialize() have been promoted to E_WARNING.
Expand Down Expand Up @@ -178,6 +192,9 @@ PHP 8.3 UPGRADE NOTES
. Added posix_fpathconf call to get configuration value from a file descriptor.
. Added posix_eaccess call to check the effective user id's permission for a path.

- PGSQL:
. Added pg_set_error_context_visilibity to set the visibility of the context in error messages.

- Random:
. Added Randomizer::getBytesFromString().
RFC: https://wiki.php.net/rfc/randomizer_additions
Expand Down Expand Up @@ -214,12 +231,17 @@ PHP 8.3 UPGRADE NOTES
. MIXED_NUMBERS (Spoofchecker).
. HIDDEN_OVERLAY (Spoofchecker).

- OpenSSL:
. OPENSSL_CMS_OLDMIMETYPE
. PKCS7_NOOLDMIMETYPE

- PCNTL:
. SIGINFO

- PGSQL:
. PGSQL_TRACE_SUPPRESS_TIMESTAMPS.
. PGSQL_TRACE_REGRESS_MODE.
. PGSQL_ERRORS_SQLSTATE.

- Posix:
. POSIX_SC_ARG_MAX.
Expand Down
25 changes: 25 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,31 @@ PHP 8.3 INTERNALS UPGRADE NOTES
- The PHPAPI spl_iterator_apply() function now returns zend_result instead of int.
There are no functional changes.

f. ext/dom
- A new function dom_get_doc_props_read_only() is added to gather the document
properties in a read-only way. This function avoids allocation when there are
no document properties changed yet.
- The node list returned by DOMNode::getElementsByTagName() and
DOMNode::getElementsByTagNameNS() now caches the length and the last requested item.
This means that the length and the last requested item are not recalculated
when the node list is iterated over multiple times.
If you do not use the internal PHP dom APIs to modify the document, you need to
manually invalidate the cache using php_libxml_invalidate_node_list_cache_from_doc().
Furthermore, the following internal APIs were added to handle the cache:
. php_dom_is_cache_tag_stale_from_doc_ptr()
. php_dom_is_cache_tag_stale_from_node()
. php_dom_mark_cache_tag_up_to_date_from_node()
- The function dom_get_elements_by_tag_name_ns_raw() has an additional parameter to indicate
the base node of the node list. This function also no longer accepts -1 as the index argument.
- The function dom_namednode_iter() has additional arguments to avoid recomputing the length of
the strings.
- The functions dom_parent_node_prepend(), dom_parent_node_append(), dom_parent_node_after(), and
dom_parent_node_before() now use an uint32_t argument for the number of nodes instead of int.

g. ext/libxml
- Two new functions: php_libxml_invalidate_node_list_cache_from_doc() and
php_libxml_invalidate_node_list_cache() were added to invalidate the cache of a node list.

========================
4. OpCode changes
========================
Expand Down
11 changes: 10 additions & 1 deletion Zend/Optimizer/block_pass.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
break;

case ZEND_FREE:
/* Note: Only remove the source if the source is local to this block.
* If it's not local, then the other blocks successors must also eventually either FREE or consume the temporary,
* hence removing the temporary is not safe in the general case, especially when other consumers are not FREE.
* A FREE may not be removed without also removing the source's result, because otherwise that would cause a memory leak. */
if (opline->op1_type == IS_TMP_VAR) {
src = VAR_SOURCE(opline->op1);
if (src) {
Expand All @@ -272,6 +276,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
case ZEND_BOOL_NOT:
/* T = BOOL(X), FREE(T) => T = BOOL(X) */
/* The remaining BOOL is removed by a separate optimization */
/* The source is a bool, no source removals take place, so this may be done non-locally. */
VAR_SOURCE(opline->op1) = NULL;
MAKE_NOP(opline);
++(*opt_count);
Expand All @@ -290,6 +295,9 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
case ZEND_PRE_DEC_OBJ:
case ZEND_PRE_INC_STATIC_PROP:
case ZEND_PRE_DEC_STATIC_PROP:
if (src < op_array->opcodes + block->start) {
break;
}
src->result_type = IS_UNUSED;
VAR_SOURCE(opline->op1) = NULL;
MAKE_NOP(opline);
Expand All @@ -302,7 +310,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
} else if (opline->op1_type == IS_VAR) {
src = VAR_SOURCE(opline->op1);
/* V = OP, FREE(V) => OP. NOP */
if (src &&
if (src >= op_array->opcodes + block->start &&
src->opcode != ZEND_FETCH_R &&
src->opcode != ZEND_FETCH_STATIC_PROP_R &&
src->opcode != ZEND_FETCH_DIM_R &&
Expand Down Expand Up @@ -1002,6 +1010,7 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array, zend_op
case ZEND_COALESCE:
case ZEND_ASSERT_CHECK:
case ZEND_JMP_NULL:
case ZEND_BIND_INIT_STATIC_OR_JMP:
ZEND_SET_OP_JMP_ADDR(opline, opline->op2, new_opcodes + blocks[b->successors[0]].start);
break;
case ZEND_CATCH:
Expand Down
13 changes: 4 additions & 9 deletions Zend/Optimizer/dce.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ static inline bool may_have_side_effects(
case ZEND_COALESCE:
case ZEND_ASSERT_CHECK:
case ZEND_JMP_NULL:
case ZEND_BIND_INIT_STATIC_OR_JMP:
/* For our purposes a jumps and branches are side effects. */
return 1;
case ZEND_BEGIN_SILENCE:
Expand Down Expand Up @@ -245,15 +246,9 @@ static inline bool may_have_side_effects(
if ((opline->extended_value & (ZEND_BIND_IMPLICIT|ZEND_BIND_EXPLICIT))) {
return 1;
}

if ((opline->extended_value & ZEND_BIND_REF) != 0) {
zval *value =
(zval*)((char*)op_array->static_variables->arData +
(opline->extended_value & ~ZEND_BIND_REF));
if (Z_TYPE_P(value) == IS_CONSTANT_AST) {
/* AST may contain undefined constants */
return 1;
}
/* Modifies static variables which are observable through reflection */
if ((opline->extended_value & ZEND_BIND_REF) && opline->op2_type != IS_UNUSED) {
return 1;
}
}
return 0;
Expand Down
1 change: 1 addition & 0 deletions Zend/Optimizer/dfa_pass.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ static void zend_ssa_replace_control_link(zend_op_array *op_array, zend_ssa *ssa
case ZEND_COALESCE:
case ZEND_ASSERT_CHECK:
case ZEND_JMP_NULL:
case ZEND_BIND_INIT_STATIC_OR_JMP:
if (ZEND_OP2_JMP_ADDR(opline) == op_array->opcodes + old->start) {
ZEND_SET_OP_JMP_ADDR(opline, opline->op2, op_array->opcodes + dst->start);
}
Expand Down
1 change: 1 addition & 0 deletions Zend/Optimizer/pass1.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
case ZEND_ASSERT_CHECK:
case ZEND_JMP_NULL:
case ZEND_VERIFY_NEVER_TYPE:
case ZEND_BIND_INIT_STATIC_OR_JMP:
collect_constants = 0;
break;
}
Expand Down
2 changes: 2 additions & 0 deletions Zend/Optimizer/sccp.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ static bool can_replace_op1(
case ZEND_ROPE_ADD:
case ZEND_ROPE_END:
case ZEND_BIND_STATIC:
case ZEND_BIND_INIT_STATIC_OR_JMP:
case ZEND_BIND_GLOBAL:
case ZEND_MAKE_REF:
case ZEND_UNSET_CV:
Expand Down Expand Up @@ -1773,6 +1774,7 @@ static void sccp_mark_feasible_successors(
case ZEND_CATCH:
case ZEND_FE_FETCH_R:
case ZEND_FE_FETCH_RW:
case ZEND_BIND_INIT_STATIC_OR_JMP:
scdf_mark_edge_feasible(scdf, block_num, block->successors[0]);
scdf_mark_edge_feasible(scdf, block_num, block->successors[1]);
return;
Expand Down
2 changes: 2 additions & 0 deletions Zend/Optimizer/zend_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ ZEND_API void zend_build_cfg(zend_arena **arena, const zend_op_array *op_array,
case ZEND_COALESCE:
case ZEND_ASSERT_CHECK:
case ZEND_JMP_NULL:
case ZEND_BIND_INIT_STATIC_OR_JMP:
BB_START(OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes);
BB_START(i + 1);
break;
Expand Down Expand Up @@ -522,6 +523,7 @@ ZEND_API void zend_build_cfg(zend_arena **arena, const zend_op_array *op_array,
case ZEND_COALESCE:
case ZEND_ASSERT_CHECK:
case ZEND_JMP_NULL:
case ZEND_BIND_INIT_STATIC_OR_JMP:
block->successors_count = 2;
block->successors[0] = block_map[OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes];
block->successors[1] = j + 1;
Expand Down
1 change: 1 addition & 0 deletions Zend/Optimizer/zend_dfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ static zend_always_inline void _zend_dfg_add_use_def_op(const zend_op_array *op_
case ZEND_POST_DEC:
case ZEND_BIND_GLOBAL:
case ZEND_BIND_STATIC:
case ZEND_BIND_INIT_STATIC_OR_JMP:
case ZEND_SEND_VAR_NO_REF:
case ZEND_SEND_VAR_NO_REF_EX:
case ZEND_SEND_VAR_EX:
Expand Down
Loading