1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

143541 Commits

Author SHA1 Message Date
Máté Kocsis
9743977f92 Fix GH-20366 ext/uri: Do not throw ValueError on null-byte (#20489) 2025-11-19 20:41:27 +01:00
Niels Dossche
aa9619e437 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  libxml: Fix input buffer deprecation
2025-11-19 18:41:50 +01:00
Niels Dossche
6eb10dc433 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  libxml: Fix input buffer deprecation
2025-11-19 18:41:43 +01:00
Niels Dossche
8c2407714f libxml: Fix input buffer deprecation
While this fixed the last deprecation in ext/libxml, it's not a full
fix: The full fix would be to move to the context-specific APIs to
override the behaviour. However, that requires API/ABI incompatible
changes so that can't be done on a stable branch.

Closes GH-20525.
2025-11-19 18:41:28 +01:00
Niels Dossche
a21783c73c Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  zip: Don't truncate return value of zip_fread() with user sizes
2025-11-18 20:31:31 +01:00
Niels Dossche
4eacb6de83 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  zip: Don't truncate return value of zip_fread() with user sizes
2025-11-18 20:31:15 +01:00
Niels Dossche
2f05830a5f zip: Don't truncate return value of zip_fread() with user sizes
The return type has been zip_int64_t since 2009, so we shouldn't
truncate to an int because the user may have requested a size that won't
fit in an int.

Closes GH-20509.
2025-11-18 20:30:42 +01:00
Niels Dossche
39dc317f1f Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  libxml: Fix some deprecations regarding input buffer/parser handling
2025-11-18 18:54:03 +01:00
Niels Dossche
4401b03aa9 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  libxml: Fix some deprecations regarding input buffer/parser handling
2025-11-18 18:53:44 +01:00
Niels Dossche
6054a900ff libxml: Fix some deprecations regarding input buffer/parser handling
Closes GH-20514.
2025-11-18 18:53:17 +01:00
Tim Düsterhus
7610527d75 lexbor: Cherry pick "URL: fixed "use-after-poison" for an empty path entry."
see lexbor/lexbor@9259b169e3

Fixes php/php-src#20502
Fixes php/php-src#20521
2025-11-18 17:32:07 +01:00
Ilija Tovilo
f558ae5204 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [skip ci] Fix Symfony PHP requirements in community build
2025-11-18 00:52:36 +01:00
Ilija Tovilo
b4eea9c68c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Fix Symfony PHP requirements in community build
2025-11-18 00:52:28 +01:00
Ilija Tovilo
24f4799783 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix Symfony PHP requirements in community build
2025-11-18 00:52:21 +01:00
Ilija Tovilo
7ceee594bf Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix Symfony PHP requirements in community build
2025-11-18 00:52:14 +01:00
Ilija Tovilo
599d5ae64c [skip ci] Fix Symfony PHP requirements in community build
Symfony 8.1 and 8.0 now require PHP 8.4. Use 7.4 for PHP 8.3 and 8.2 builds. PHP
8.1 continues to be skipped. Sadly, this will need to be updated sporadically.

Closes GH-20512
2025-11-18 00:51:39 +01:00
Volker Dusch
1ff90c4b1e [ci skip] Consolidate NEWS for PHP 8.5.0 2025-11-18 00:28:47 +01:00
Tim Düsterhus
8e6d375966 lexbor: Cherry pick "URL: the cloning function does not copy the type for IPv4 and IPv6."
see lexbor/lexbor@dcfcd645c6

Fixes php/php-src#20501
2025-11-17 19:29:23 +01:00
Niels Dossche
6cac6d49ce Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix assertion failures resulting in crashes with stream filter object parameters
2025-11-17 18:24:34 +01:00
Niels Dossche
48d80d2729 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix assertion failures resulting in crashes with stream filter object parameters
2025-11-17 18:24:13 +01:00
Niels Dossche
93ce0500aa Fix assertion failures resulting in crashes with stream filter object parameters
This works for dynamic props but not for non-dynamic props due to the
missing INDIRECT handling.

Closes GH-20500.
2025-11-17 18:23:43 +01:00
Niels Dossche
75cd8fbb55 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix crash in property existence test in ext/zip
2025-11-16 21:29:16 +01:00
Niels Dossche
9db074d2ad Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix crash in property existence test in ext/zip
2025-11-16 21:28:57 +01:00
Niels Dossche
46a15ed439 Fix crash in property existence test in ext/zip
When type == 2, the zval is not initialized, so zval_ptr_dtor() on it
will crash.
Unfortunately couldn't test with property_exists() or Reflection because
they have fast paths that go through the property info, but fortunately
there are paths that don't implement a fast path (e.g. because it
doesn't make sense at that point), like with array_column().
So we use array_column() to trigger the crash.

Closes GH-20496.
2025-11-16 21:28:30 +01:00
David Carlier
01bca99955 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20483: ASAN stack overflow with small fiber.stack_size INI value.
2025-11-15 17:21:20 +00:00
David Carlier
e3c23015a0 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20483: ASAN stack overflow with small fiber.stack_size INI value.
2025-11-15 17:21:08 +00:00
David Carlier
d2c5b3b25b Fix GH-20483: ASAN stack overflow with small fiber.stack_size INI value.
close GH-20495
2025-11-15 17:20:29 +00:00
Niels Dossche
c666d6b5d9 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix assertion failure when fseeking a phar file out of bounds
2025-11-15 14:34:21 +01:00
Niels Dossche
3a2868fb76 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix assertion failure when fseeking a phar file out of bounds
2025-11-15 14:33:58 +01:00
Niels Dossche
d9e40372fc Fix assertion failure when fseeking a phar file out of bounds
In 61884c3b52 I added these FIXME comments after I noticed that this
would cause an assertion failure. At that time I did not yet know what
to do here. I took a look at the code now and other streams return -1
and leave the file position untouched. So we do the same for phar.
This fixes the assertion failure and subsequent crashes, but also
changes one test output. However, I believe the new test output is
correct.

Closes GH-20475.
2025-11-15 14:33:33 +01:00
Niels Dossche
7809d51918 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Revert "ext/phar: Voidify flush function as it always returns EOL"
  phar: Fix broken return value of fflush() for phar file entries
2025-11-15 13:59:38 +01:00
Niels Dossche
08ec409f1b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  phar: Fix broken return value of fflush() for phar file entries
2025-11-15 13:58:17 +01:00
Niels Dossche
fd5c14e682 Revert "ext/phar: Voidify flush function as it always returns EOL"
This reverts commit 2513258a2b.
2025-11-15 13:57:47 +01:00
Niels Dossche
2f9d86b677 phar: Fix broken return value of fflush() for phar file entries
The flush functions always return EOF, even in the success path.
The success path should return 0 to indicate success.

Closes GH-20474.
2025-11-15 13:56:06 +01:00
Theodore Brown
7263cb61e0 [skip ci] Fix destructuring typo in NEWS and UPGRADING (#20488) 2025-11-15 12:48:34 +01:00
Niels Dossche
0909f1305d Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  xml: Use safe_emalloc() correctly
2025-11-15 12:45:53 +01:00
Niels Dossche
835c6c7c7f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  xml: Use safe_emalloc() correctly
2025-11-15 12:45:46 +01:00
Niels Dossche
48b19a8ede xml: Use safe_emalloc() correctly
Fortunately, libxml won't allow _at this point in time_ to have more
than INT_MAX/5 attributes, so this doesn't cause issues right now.
However, if this limit is ever raised then it can cause an integer
overflow which will cause a heap overflow.
So future-proof this code by properly using safe_emalloc().

Closes GH-20472.
2025-11-15 12:45:28 +01:00
Gina Peter Banyard
e1c8ed614e Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  sapi/phpdbg: use 'h' ZPP specifier instead of'H'
2025-11-13 01:32:14 +00:00
Gina Peter Banyard
a7fd6fc8d6 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  sapi/phpdbg: use 'h' ZPP specifier instead of'H'
2025-11-13 01:31:42 +00:00
Gina Peter Banyard
37e61a0dc0 sapi/phpdbg: fixed ZPP type violation by using 'h' ZPP specifier instead of 'H'
This aligns the behaviour with what the stubs say.
And even if one fixes the stubs the behaviour is not identical due to missing indirect handling.

This indicates that using objects is never done, so do the easy fix of changing the ZPP specifier.

Closes GH-20465
2025-11-13 01:30:49 +00:00
Niels Dossche
abad39a42a Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  dom: Fix missing NUL byte check on C14NFile()
2025-11-13 00:03:56 +01:00
Niels Dossche
a103251eb2 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  dom: Fix missing NUL byte check on C14NFile()
2025-11-13 00:03:36 +01:00
Niels Dossche
8ad5915756 dom: Fix missing NUL byte check on C14NFile()
Closes GH-20466.
2025-11-13 00:03:13 +01:00
Niels Dossche
f996abde33 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20395: \Dom\ParentNode::querySelector and \Dom\ParentNode::querySelectorAll requires elements in $selectors to be lowercase (#20409)
2025-11-12 19:34:41 +01:00
Niels Dossche
3ad5799f25 Fix GH-20395: \Dom\ParentNode::querySelector and \Dom\ParentNode::querySelectorAll requires elements in $selectors to be lowercase (#20409)
The selector needs to be compared in a lowercase manner.
This also almost completely obsoletes the interned string optimization,
so get rid of that for simplicity sake. While there is still theoretical
benefit, it is only 1-2% in my random tests, not worth it anymore.
2025-11-12 19:30:58 +01:00
Gina Peter Banyard
414e7db68a sapi/phpdbg: use 'h' ZPP specifier instead of'H'
The stubs say array so in debug mode we get a ZPP violation assertion and even by fixing the stubs the behaviour is not identical due to missing indirect handling.

This indicates using objects was never done, thus use the correct ZPP specifier
2025-11-12 16:01:43 +00:00
Daniel Scherzer
86b0a2a2b0 NEWS: update for PHP 8.5.0RC5, fix next release
Copy the NEWS entries from the RC5 tag with the changes included there. One of
those entries was already listed in the section for the next release from
PHP-8.5; remove it from that section. Also update the header at the top for
what release is next - the next release from the PHP-8.5 branch is going to be
PHP 8.5.1.

[skip ci]
2025-11-11 18:22:27 -08:00
Ilija Tovilo
926f44d712 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Correctly handle extra named args for magic call in debug_backtrace_get_args()
2025-11-12 00:33:37 +01:00
Ilija Tovilo
eee5dcccf8 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Correctly handle extra named args for magic call in debug_backtrace_get_args()
2025-11-12 00:33:28 +01:00