Máté Kocsis
6988973bc6
Declare type for ext/ffi internal class constants
...
Since the relevant classes are final, it's straightforward to declare the type of these class constants
2023-07-18 10:09:26 +02:00
Gabriel Fontes
cd9dba81c7
small fixes
2023-07-18 08:31:02 +01:00
Ilija Tovilo
a48b977d3f
Use :- as ini interpolation fallback separator
2023-07-18 08:31:02 +01:00
Gabriel Fontes
bc8b9aedf6
Add fallback value syntax for ini variables
2023-07-18 08:31:02 +01:00
Ilija Tovilo
0b0cec5b8a
Fix clang warning
...
has_range_constraint should can be a bool, remove unused visited field.
Closes GH-11729
2023-07-18 00:49:13 +02:00
Ilija Tovilo
1a0ef2c1cc
Revert "Remove name field from the zend_constant struct ( #10954 )"
...
This reverts commit f42992f580 .
Closes GH-11604
2023-07-17 22:32:41 +02:00
Niels Dossche
de60872cfd
Add new curl constants from curl until (including) 7.87 ( #10459 )
...
Fixes GH-10454
2023-07-17 20:42:39 +02:00
Niels Dossche
db5e8ae6cf
Implement DOMElement::toggleAttribute()
...
ref: https://dom.spec.whatwg.org/#dom-element-toggleattribute
Closes GH-11696.
2023-07-17 20:06:49 +02:00
Niels Dossche
5b5a3d79da
Split off some methods so they can be reused in different places
2023-07-17 20:06:38 +02:00
Niels Dossche
a73f38f407
Implement DOMElement::insertAdjacent{Element,Text} ( #11700 )
...
* Implement DOMElement::insertAdjacent{Element,Text}
ref: https://dom.spec.whatwg.org/#dom-element-insertadjacentelement
ref: https://dom.spec.whatwg.org/#dom-element-insertadjacenttext
Closes GH-11700.
2023-07-17 17:42:47 +02:00
George Peter Banyard
d8696f9216
[RFC] Path to Saner Increment/Decrement operators ( #10358 )
...
* Add behavioural tests for incdec operators
* Add support to ++/-- for objects castable to _IS_NUMBER
* Add str_increment() function
* Add str_decrement() function
RFC: https://wiki.php.net/rfc/saner-inc-dec-operators
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com >
Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com >
2023-07-17 15:51:24 +01:00
Niels Dossche
2f318cfb06
Implement DOMNode::isEqualNode()
...
Since we still support obsoleted nodes in our implementation, this uses
the old spec to match the old nodes; and this uses the new spec for
nodes still defined in the living spec.
When unclear, the behaviour was cross-verified with Firefox.
References:
https://dom.spec.whatwg.org/#dom-node-isequalnode (for everything still in the living spec)
https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/DOM3-Core.html#core-Node3-isEqualNode (for old nodes removed from the living spec)
Closes GH-11690.
2023-07-17 15:29:36 +02:00
Niels Dossche
c97507b5c1
Fix build on Windows
2023-07-17 14:28:06 +02:00
Ilija Tovilo
1c76da62db
Fix gc_status type info
...
Closes GH-11722
2023-07-17 13:49:23 +02:00
Niels Dossche
d04f48b6ac
Implement DOMNode::parentElement and DOMNameSpaceNode::parentElement
...
ref: https://dom.spec.whatwg.org/#parent-element
Closes GH-11679.
2023-07-17 13:15:31 +02:00
Niels Dossche
d38cc9b9b6
Implement DOMNode::isConnected and DOMNameSpaceNode::isConnected
...
ref: https://dom.spec.whatwg.org/#dom-node-isconnected
Closes GH-11677.
2023-07-17 13:14:13 +02:00
Niels Dossche
9c5cf6594d
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Prevent potential deadlock if accelerated globals cannot be allocated
2023-07-17 13:03:11 +02:00
Niels Dossche
8b1d352ed8
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Prevent potential deadlock if accelerated globals cannot be allocated
2023-07-17 13:00:00 +02:00
Niels Dossche
b0bc057e86
Prevent potential deadlock if accelerated globals cannot be allocated
...
Not sure if this is possible to hit in practice, zend_accel_error_noreturn
doesn't return so the unlock isn't called. Other callsites that use both
zend_accel_error_noreturn and zend_shared_alloc_unlock first perform the
unlocking.
Closes GH-11718.
2023-07-17 12:49:15 +02:00
George Peter Banyard
ca8dab3b8a
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix GH-11587 PDO::ATTR_STRINGIFY_FETCHES should return strings even in if PDO::ATTR_EMULATE_PREPARES is enabled
2023-07-17 07:10:16 +01:00
George Peter Banyard
5f716bf2df
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix GH-11587 PDO::ATTR_STRINGIFY_FETCHES should return strings even in if PDO::ATTR_EMULATE_PREPARES is enabled
2023-07-17 07:09:34 +01:00
SakiTakamachi
e0aadc1c0d
Fix GH-11587 PDO::ATTR_STRINGIFY_FETCHES should return strings even in if PDO::ATTR_EMULATE_PREPARES is enabled
...
This also includes a fix for the MySQL ND driver to actually respect the user decided behaviour.
Closes GH-11622
Signed-off-by: George Peter Banyard <girgias@php.net >
2023-07-17 07:08:45 +01:00
George Peter Banyard
d65251e6e8
Deprecate NumberFormater::TYPE_CURRENCY constant
2023-07-17 05:01:13 +01:00
George Peter Banyard
3e2dbbf9c2
Add support for deprecating class constants
2023-07-17 05:01:13 +01:00
George Peter Banyard
af3c220abb
Deprecate passing a negative width to mb_strimwidth()
2023-07-17 05:01:13 +01:00
Peter Kokot
cbd903d051
Update config.guess to 2023-06-23 and config.sub to 2023-06-26 ( #11711 )
...
```
wget -O config.guess https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
wget -O config.sub https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
```
2023-07-16 18:43:20 +01:00
Arnaud Le Blanc
e413419e33
[ci skip] UPGRADING / NEWS
2023-07-16 13:42:35 +02:00
Arnaud Le Blanc
cbf67e4fee
Remove WeakMap entries whose key is only reachable through the entry value ( #10932 )
2023-07-16 13:39:08 +02:00
Arnaud Le Blanc
d0731934b7
Expose time spent collecting cycles in gc_status() ( #11523 )
2023-07-16 12:34:28 +02:00
Joshua Behrens
08b57772b0
Warn when fpm socket was not registered on the expected path
...
This might happen if the UDS length limit is exceeded.
Co-authored-by: Jakub Zelenka <bukka@php.net >
Closes GH-11066
2023-07-15 14:21:58 +01:00
Niels Dossche
72e2e25066
Implement DOMElement::id
...
ref: https://dom.spec.whatwg.org/#dom-element-id
Closes GH-11701.
2023-07-14 14:37:11 +02:00
Niels Dossche
e8f0bdc7f1
Fix ?
2023-07-14 14:34:29 +02:00
Niels Dossche
6560c9bf8e
Implement DOMParentNode::replaceChildren()
...
ref: https://dom.spec.whatwg.org/#dom-parentnode-replacechildren
2023-07-14 14:34:29 +02:00
Niels Dossche
b24b3510f9
Implement DOMElement::className
...
ref: https://dom.spec.whatwg.org/#dom-element-classname
Closes GH-11691.
2023-07-13 19:05:09 +02:00
George Peter Banyard
3d4ff5ae22
RFC: Deprecate remains of string evaluated code assertions ( #11671 )
...
Link: https://wiki.php.net/rfc/assert-string-eval-cleanup
2023-07-13 15:45:32 +01:00
Marc Bennewitz
591f3f619e
Prevent decimal int precision loss in number_format()
...
Closes GH-11584
2023-07-13 15:30:30 +01:00
Niels Dossche
d17069e191
Implement DOMNode::getRootNode()
...
ref: https://dom.spec.whatwg.org/#dom-node-getrootnode
Closes GH-11693.
2023-07-13 16:27:28 +02:00
Niels Dossche
10d7e8dc3a
Implement DOMElement::getAttributeNames()
...
ref: https://dom.spec.whatwg.org/#dom-element-getattributenames
2023-07-13 16:18:10 +02:00
Niels Dossche
b3899eb569
Refactor dom_node_node_name_read() to avoid double allocation
...
We will use this helper later outside of the node name read handler.
2023-07-13 16:18:10 +02:00
Niels Dossche
62ef7bb27a
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Handle fragments consisting out of multiple children without a single root correctly
2023-07-13 16:12:49 +02:00
Niels Dossche
f2ed2b877d
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Handle fragments consisting out of multiple children without a single root correctly
2023-07-13 16:12:35 +02:00
Niels Dossche
5c26258eeb
Handle fragments consisting out of multiple children without a single root correctly
...
Closes GH-11698.
2023-07-13 16:09:04 +02:00
Niels Dossche
f04e5059bb
Avoid allocations in DOMElement::getAttribute()
2023-07-13 16:07:57 +02:00
Niels Dossche
9880c336be
Avoid string allocation in dom_get_dom1_attribute() for as long as possible
2023-07-13 16:07:57 +02:00
Ilija Tovilo
66e2aa7255
Fix use-of-uninitialized-value when calling php_posix_stream_get_fd ( #11694 )
...
Passing a double pointer to php_stream_cast means the caller of
php_posix_stream_get_fd will never receive the actual value. Moreover,
php_posix_stream_get_fd may only write the low sizeof(php_socket_t) bytes of fd,
so we need to initialize the upper bytes to 0 to avoid partial
use-of-uninitialized-value.
2023-07-13 15:21:36 +02:00
Jorg Adam Sowa
0313640b48
Reorder list construction in the function php_intpow10 ( #11683 )
...
* Reorder array construction in the function
* Optimize function php_intlog10abs
2023-07-13 13:46:45 +01:00
Cristian Rodríguez
5572975ba7
proc_open: Use posix_spawn(3) interface on systems where it is profitable
...
As the size of the PHP process increases, forking gets slower and memory
consumption increases, degrading the performance in varying degrees.
This patch makes proc_open use posix_spawn only on systems which is known to be
safe, faster than the HAVE_FORK path and have posix_spawn_file_actions_addchdir_np(3)
action.
Non scientific benchmark shows running php own's test suite on linux completes
dozens of seconds faster, the impact is probably higher on systems where
posix_spawn is a syscall.
Closes GH-7933
2023-07-13 13:29:42 +01:00
David CARLIER
a077c2dd6c
Merge branch 'PHP-8.2'
2023-07-13 12:40:59 +01:00
David CARLIER
0309800b4d
Merge branch 'PHP-8.1' into PHP-8.2
2023-07-13 12:40:47 +01:00
David Carlier
69b4360e88
zend_gdb disable gdb detection for FreeBSD < 11.
...
ref PR: https://github.com/php/php-src/pull/11599 .
Close GH-11646
2023-07-13 12:39:58 +01:00