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

132390 Commits

Author SHA1 Message Date
Eric Mann
8cc8f1a5de Update versions for PHP 8.3.0alpha2 php-8.3.0alpha2 2023-06-20 09:09:21 -07:00
Sergey Panteleev
7656e761dd Merge branch 'PHP-8.2'
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.9-dev

# Conflicts:
#	Zend/zend.h
#	configure.ac
#	main/php_version.h
2023-06-20 17:27:59 +03:00
Sergey Panteleev
884a53f39a PHP-8.2 is now for PHP 8.2.9-dev 2023-06-20 17:25:30 +03:00
Patrick Allaert
245e923d01 Merge branch 'PHP-8.2' 2023-06-20 16:07:48 +02:00
Patrick Allaert
5d97c15103 Merge branch 'PHP-8.1' into PHP-8.2 2023-06-20 16:07:27 +02:00
Patrick Allaert
6c4b1e0417 PHP-8.1 is now for PHP 8.1.22-dev 2023-06-20 16:07:05 +02:00
Dmitry Stogov
1949151935 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fixed incorrect VM stack overflow checks elimination
2023-06-20 12:00:32 +03:00
Dmitry Stogov
e50ed0f1a2 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed incorrect VM stack overflow checks elimination
2023-06-20 12:00:20 +03:00
Dmitry Stogov
1a96d64828 Fixed incorrect VM stack overflow checks elimination 2023-06-20 11:59:36 +03:00
Alex Dowad
443927e3e8 Fix GH-11476: crash with count_demerits negative-size-param
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2023-06-19 22:05:15 +02:00
divinity76
4918765d54 SKIP_(SLOW|ONLINE)_TESTS (#11479)
it was missing the SKIP_ONLINE_TESTS check for windows.
2023-06-19 19:44:03 +01:00
nielsdos
ad5ee8a2b7 Revert changes to DOMAttr::$value and DOMAttr::$nodeValue expansion
Closes GH-11469.
2023-06-19 19:52:28 +02:00
nielsdos
12e4628815 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11455: Segmentation fault with custom object date properties
  Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM"
2023-06-19 19:45:24 +02:00
Niels Dossche
93becab506 Fix GH-11455: Segmentation fault with custom object date properties
Closes GH-11473.
2023-06-19 19:42:09 +02:00
nielsdos
de0223113a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM"
2023-06-19 19:38:30 +02:00
nielsdos
c174ebfce0 Revert "Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM"
This reverts commit 7eb3e9cd17.

Although the fix follows the spec, it causes issues because a lot of old
code assumes the incorrect behaviour PHP had since a long time.
We cannot do this yet, especially not in a stable release.
We revert this for the time being.
See GH-11428.
2023-06-19 19:37:46 +02:00
George Peter Banyard
798c40a739 [RFC] Define proper semantics for range() function (#10826)
RFC: https://wiki.php.net/rfc/proper-range-semantics
2023-06-19 14:25:26 +01:00
George Peter Banyard
ea8f934fe5 Zend: Expose zendi_try_get_long() function via a public API (#10175) 2023-06-19 14:07:46 +01:00
David CARLIER
b0d8c10fd9 ext/gd: imagerotate removes ignore_transparent argument.
seems to be a relic of PHP 5 but no longer makes sense in regard of gdImageRotateInterpolated.

Close GH-11426
2023-06-19 12:32:08 +01:00
Niels Dossche
a37ad648b8 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix #80332: Completely broken array access functionality with DOMNamedNodeMap
2023-06-18 15:21:12 +02:00
Niels Dossche
862487e95e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix #80332: Completely broken array access functionality with DOMNamedNodeMap
2023-06-18 15:02:46 +02:00
Niels Dossche
9f7d88802e Fix #80332: Completely broken array access functionality with DOMNamedNodeMap
The problem is the usage of zval_get_long(). In particular, if the
string is non-numeric the result of zval_get_long() will be 0 without
giving an error or warning. This is misleading for users: users get the
impression that they can use strings to access the map because it
coincidentally works for the first item (which is at index 0). Of
course, this fails with any other index which causes confusion and bugs.

This patch adds proper support for using string offsets while accessing
the map. It does so by detecting if it's a non-numeric string, and then
using the getNamedItem() method instead of item(). I had to split up the
array access implementation code for DOMNodeList and DOMNamedNodeMap
first to be able to do this.

Closes GH-11468.
2023-06-18 14:59:19 +02:00
Niels Dossche
8904ac7fef Add missing cache invalidation in dom_child_replace_with()
This was forgotten during an earlier merge.
2023-06-18 14:55:31 +02:00
David Carlier
1cc563f521 Merge branch 'PHP-8.2' 2023-06-18 13:48:04 +01:00
David Carlier
bc45b34b30 Merge branch 'PHP-8.1' into PHP-8.2 2023-06-18 13:45:30 +01:00
David CARLIER
f194cdf852 ext/pgsql: fix PGtrace invalid free issue.
disable trace when closing the connection, is a no op if there is no stream
attached to it.

Close GH-11403
2023-06-18 13:44:39 +01:00
George Peter Banyard
80e90ad7ba Add number or str ZPP macros 2023-06-18 13:09:03 +01:00
George Peter Banyard
53829b7daf Move range() tests to a dedicated folder 2023-06-18 13:08:50 +01:00
George Peter Banyard
6c25257db0 ext/imap: Refactor common conditional property assignment
By introducing new functions and doing some preprocessor black magic
2023-06-18 13:05:02 +01:00
George Peter Banyard
cc9ab53308 ext/imap: Narrow return type to true
Those functions always return true as of PHP 8.0.
2023-06-18 13:05:02 +01:00
George Peter Banyard
d714ae8964 ext/imap: Refactor imap_fetch_overview()
Reduce level of indentations by using early guards to return/continue
2023-06-18 13:05:02 +01:00
George Peter Banyard
b1f24e3bea ext/imap: Add const qualifier for header_injection()
Also reformat long if condition to make it clearer
2023-06-18 13:05:02 +01:00
George Peter Banyard
b1dd9b8a39 ext/imap: Do not condition on number of arguments but on pointer being set or not 2023-06-18 13:05:02 +01:00
George Peter Banyard
0b99bc21e5 ext/imap: Cleanup custom implementation of rfc822_write_address()
This is used only when c-client does not have this feature, maybe this is something we should asume nowadays?
2023-06-18 13:05:02 +01:00
George Peter Banyard
9798dc20e2 ext/imap: Use propery API instead of php_imap_hash_add_object()
It was only ever used to update an object property table and never an associative array.
2023-06-18 13:05:02 +01:00
George Peter Banyard
5d0304876f ext/imap: Remove php_imap_list_add_object() function
The symtable was always an array so use appropriate HashTable API
2023-06-18 13:05:02 +01:00
Niels Dossche
47708765d6 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM
2023-06-17 13:42:10 +02:00
Niels Dossche
bb3e5a8f55 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM
2023-06-17 13:36:44 +02:00
nielsdos
7eb3e9cd17 Fix GH-11404: DOMDocument::savexml and friends ommit xmlns="" declaration for null namespace, creating incorrect xml representation of the DOM
The NULL namespace is only correct when there is no default namespace
override. When there is, we need to manually set it to the empty string
namespace.

Closes GH-11428.
2023-06-17 13:36:00 +02:00
Ilija Tovilo
1518443500 Merge branch 'PHP-8.2'
* PHP-8.2:
  [skip ci] Don't suppress setup-slapd.sh output
2023-06-16 12:06:43 +02:00
Ilija Tovilo
2086740c9e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Don't suppress setup-slapd.sh output
2023-06-16 12:06:33 +02:00
Ilija Tovilo
1c85278fbe [skip ci] Don't suppress setup-slapd.sh output
This step frequently fails in CI. We would like to now why to see if we can
improve stability.
2023-06-16 12:04:05 +02:00
nielsdos
035105b252 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11451: Invalid associative array containing duplicate keys
2023-06-15 21:56:40 +02:00
nielsdos
29a96e09b2 Fix GH-11451: Invalid associative array containing duplicate keys
It used the "add_new" variant which assumes the key doesn't already
exist. But in case of duplicate keys we have to take the last result.

Closes GH-11453.
2023-06-15 21:56:06 +02:00
nielsdos
08f6072263 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix bug #55294 and #47530 and #47847: namespace reconciliation issues
2023-06-15 21:53:16 +02:00
nielsdos
923e72615f Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix bug #55294 and #47530 and #47847: namespace reconciliation issues
2023-06-15 21:50:47 +02:00
nielsdos
b30be40b86 Fix bug #55294 and #47530 and #47847: namespace reconciliation issues
We'll use the DOM wrapper version of libxml2 instead of the regular one.
It's conforming to the behaviour we expect of DOM.
Most of this patch is tests.

I based and extended the tests on the code attached with the aforementioned
bug reports. Therefore the credits for the tests:
Co-authored-by: hilse at web dot de
Co-authored-by: robin2008 at altruists dot org
Co-authored-by: sgunderson at bigfoot dot com

We'll also change the searching point of the internal reconciliation to
start at the top of the added tree to avoid redundant work now that the
function is changed.

Closes GH-11454.
2023-06-15 21:50:00 +02:00
Tim Starling
ea2ee60552 When running FPM tests, pass -n option to php-fpm
"make test" was failing for me, because I was running it prior to
install, and there was an old installed version which was incompatible.
The FPM tests were using the installed php.ini which referenced
installed dynamically linked extensions.

So, pass -n to php-fpm.

FPM\Tester::start() has $extensions, $iniEntries and
TEST_FPM_EXTENSION_DIR but they are not actually set by anything. Rather
than rely on the installed php.ini to be correct, it seems safer to pass
-n, and any tests that need specific config can pass $iniEntries.

Closes GH-11373
2023-06-15 18:00:50 +01:00
Jakub Zelenka
1fa5d306d8 Merge branch 'PHP-8.2' 2023-06-15 17:37:35 +01:00
Jakub Zelenka
6877b4f110 Merge branch 'PHP-8.1' into PHP-8.2 2023-06-15 17:37:09 +01:00