1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Commit Graph

143550 Commits

Author SHA1 Message Date
Remi Collet 7bdeedb430 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  NEWS
  NEWS
  Fix GH-20528: Regression breaks mysql connexion using an IPv6 address enclosed in square brackets
2025-11-21 09:20:41 +01:00
Remi Collet 74c4510da9 NEWS 2025-11-21 09:20:22 +01:00
Remi Collet c9de303087 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  NEWS
  Fix GH-20528: Regression breaks mysql connexion using an IPv6 address enclosed in square brackets
2025-11-21 09:19:56 +01:00
Remi Collet 769f319867 NEWS 2025-11-21 09:19:38 +01:00
Remi Collet 9d71c1e0b6 Fix GH-20528: Regression breaks mysql connexion using an IPv6 address enclosed in square brackets 2025-11-21 09:17:20 +01:00
Niels Dossche 929e7177f1 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20492: mbstring compile warning due to non-strings
  Fix GH-20491: SLES15 compile error with mbstring oniguruma
2025-11-20 19:26:48 +01:00
Niels Dossche 10ac41f158 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20492: mbstring compile warning due to non-strings
  Fix GH-20491: SLES15 compile error with mbstring oniguruma
2025-11-20 19:23:36 +01:00
Niels Dossche 159ef1401c Fix GH-20492: mbstring compile warning due to non-strings
This is a partial backport of ea69276f, but without changing public
headers as that's not allowed at this point.

Closes GH-20494.
2025-11-20 19:17:55 +01:00
Niels Dossche a1912e3cdd Fix GH-20491: SLES15 compile error with mbstring oniguruma
The issue is specific to SLES15.
Arguably this should be reported to them as it seems to me they meddled
with the oniguruma source code.

The definition in oniguruma.h on that platform looks like this (same as upstream):
```c
ONIG_EXTERN
int onig_error_code_to_str PV_((OnigUChar* s, int err_code, ...));
```

Where `PV_` is defined as (differs):
```c
#ifndef PV_
#ifdef HAVE_STDARG_PROTOTYPES
# define PV_(args) args
#else
# define PV_(args) ()
#endif
#endif
```

So that means that `HAVE_STDARG_PROTOTYPES` is unset.
This can be set if we define `HAVE_STDARG_H`,
which we can do because PHP requires at least C99 in which the header
is always available.
We could also use an autoconf check, but this isn't really necessary as
it will always succeed.
2025-11-20 19:17:17 +01:00
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