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

139143 Commits

Author SHA1 Message Date
Gina Peter Banyard
b48fdcb6e6 Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/hash: Fix deprecation message output for new tests
2024-11-10 20:35:04 +00:00
Gina Peter Banyard
883d3c8113 ext/hash: Fix deprecation message output for new tests 2024-11-10 20:34:45 +00:00
Gina Peter Banyard
46431487f7 Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/hash: Fix GH-16711: Segfault in mhash()
  ext/hash: Add failing tests for GH-16711
2024-11-10 20:17:28 +00:00
Gina Peter Banyard
c1d67c2415 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/hash: Fix GH-16711: Segfault in mhash()
  ext/hash: Add failing tests for GH-16711
2024-11-10 20:17:09 +00:00
Gina Peter Banyard
f01bafc340 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/hash: Fix GH-16711: Segfault in mhash()
  ext/hash: Add failing tests for GH-16711
2024-11-10 20:16:33 +00:00
Gina Peter Banyard
1b379f5e55 ext/hash: Fix GH-16711: Segfault in mhash()
Closes GH-16713
2024-11-10 20:15:44 +00:00
Gina Peter Banyard
fc8f30d312 ext/hash: Add failing tests for GH-16711 2024-11-10 20:14:21 +00:00
Christoph M. Becker
067ac63196 Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Fix MYSQLND_HAVE_SSL preprocessor help texts
2024-11-10 20:41:35 +01:00
Peter Kokot
41347f017b [skip ci] Fix MYSQLND_HAVE_SSL preprocessor help texts
The MYSQLND_HAVE_SSL indicate that mysqlnd has extended SSL support
enabled through either OpenSSL when building with Autotools, and through
crypt32 library on Windows.

Fixes https://github.com/php/php-src/pull/15164#discussion_r1803834585

Closes GH-16474.
2024-11-10 20:41:06 +01:00
DanielEScherzer
62e53e6f49 Inline and remove reflection_instantiate() (#16739)
Since the return value is never used, the only difference between using this
method and using `object_init_ex()` directly is the flipped order of
parameters, and the added level of indirection - remove that level of
indirection by replacing its uses.
2024-11-09 17:40:45 +01:00
Niels Dossche
4e21e80400 Merge branch 'PHP-8.4'
* PHP-8.4:
  [ci skip] Add credit for test
2024-11-09 17:10:07 +01:00
Niels Dossche
896eb80d07 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [ci skip] Add credit for test
2024-11-09 17:09:59 +01:00
Niels Dossche
f97353f228 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] Add credit for test
2024-11-09 17:09:51 +01:00
Niels Dossche
d87f3ff662 [ci skip] Add credit for test 2024-11-09 17:09:35 +01:00
Niels Dossche
37d53d5a04 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16695: phar:// tar parser and zero-length file header blocks
2024-11-09 17:08:55 +01:00
Niels Dossche
c6d7d07a1d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16695: phar:// tar parser and zero-length file header blocks
2024-11-09 17:08:49 +01:00
Niels Dossche
58f4b45bca Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16695: phar:// tar parser and zero-length file header blocks
2024-11-09 17:08:19 +01:00
Niels Dossche
72c0222926 Fix GH-16695: phar:// tar parser and zero-length file header blocks
There are two issues:
1) There's an off-by-one in the check for the minimum file size for a
   tar (i.e. `>` instead of `>=`).
2) The loop in the tar parsing parses a header, and then unconditionally
   reads the next one. However, that doesn't necessarily exist.
   Instead, we remove the loop condition and check for the end of the
   file before reading the next header. Note that we can't use
   php_stream_eof as the flag may not be set yet when we're already at
   the end.

Closes GH-16700.
2024-11-09 17:07:53 +01:00
Niels Dossche
89e750a201 Fix macOS CI
Install curl via brew.

Closes GH-16735.

Co-authored-by: "Christoph M. Becker" <cmbecker69@gmx.de>
2024-11-09 15:34:37 +01:00
DanielEScherzer
54003aecc4 Fix description of ReflectionParameter::getPosition() (GH-16738)
Appears to have been copied from `ReflectionParameter::isOptional()`.

[skip ci]
2024-11-09 15:32:53 +01:00
Christoph M. Becker
07d4c541cb Merge branch 'PHP-8.4'
* PHP-8.4:
  Fail early in *nix build script
2024-11-09 14:10:15 +01:00
Hans Krentel (hakre)
329890c149 Fail early in *nix build script
Adding one more [1] exit early safeguard in *nix build scripts:

Given the initial cd into the build tree fails (the project root),
   the `buildconf` script exits with non-zero status (failure).

Additionally quoting the pathname to cd into and the empty CD_PATH
parameter for portability, also for systems that are using a
non-portable pathname [2] for the build tree.

[1]: https://github.com/php/php-src/pull/16717
[2]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_271

Closes GH-16724.
2024-11-09 14:09:58 +01:00
Christoph M. Becker
f603d9c703 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fail early in *nix configuration build script
2024-11-09 14:07:12 +01:00
Christoph M. Becker
257387b9e5 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fail early in *nix configuration build script
2024-11-09 14:06:35 +01:00
Christoph M. Becker
11da498add Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fail early in *nix configuration build script
2024-11-09 14:05:38 +01:00
Hans Krentel (hakre)
c075546320 Fail early in *nix configuration build script
Adding two exit early safeguards in the *nix configuration build script:

1) Given the initial cd into the build tree fails (the project root),
   the `buildconf` script exits with non-zero status (failure).
2) Given the grep command does not exist or `configure.ac` AC_INIT [1]
   expectations are unmet, the buildconf script exits non-zero.

Additionally quoting the pathname to cd into and the empty CD_PATH
parameter for portability, also for systems that are using a
non-portable pathname [2] for the build tree.

The initial CD safeguard has been applied to the `buildconf` and
four more scripts:

- build/genif.sh
- scripts/dev/credits
- scripts/dev/genfiles
- scripts/dev/makedist

Rationale:

Cd-ing into the project root should always prematurely exit w/ FAILURE
as a required precondition for its invocation has not been met. This
should never go unnoticed as it always requires user intervention.

Similar and more specifically to the PHP build on *nix systems, the
grep command is required early to obtain the `php_extra_version` from
configure.ac.  Previously, if the grep command is missing (or failing
due to not matching the line with the AC_INIT macro [1]), the internal
dev parameter would always be zero (0) which can easily result in the
situation that the configure script is not being rebuilt. This is
cumbersome as the rebuild of a configure script is more likely required
with checked-out dev versions under change rather than an already
properly set-up build environment on a dedicated build or release
system. Missing the fact that either the grep utility is missing or
the expectation of having the AC_INIT macro in configure.ac is unmet
should never go unnoticed as it always requires user intervention.

[1]: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Initializing-configure.html
[2]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_271

Closes GH-16717.
2024-11-09 14:03:04 +01:00
Christoph M. Becker
9ebbe1e3f3 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16723: CURLMOPT_PUSHFUNCTION issues
2024-11-09 12:44:16 +01:00
Christoph M. Becker
3a1a205f2a Fix GH-16723: CURLMOPT_PUSHFUNCTION issues
We copy the source handler's FCCs to those of the destination.

We also fix the erroneous test assumption that the trampoline wouldn't
be called.

Closes GH-16732.
2024-11-09 12:43:29 +01:00
Niels Dossche
cc54e66ad8 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix wrong merge
2024-11-09 11:49:25 +01:00
Niels Dossche
ef1e1868ed Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix wrong merge
2024-11-09 11:49:16 +01:00
Niels Dossche
80dd5a0306 Fix wrong merge 2024-11-09 11:49:08 +01:00
Niels Dossche
56bd057123 [ci skip] NEWS for ReflectionConstant additions 2024-11-09 11:09:36 +01:00
DanielEScherzer
10f1f924cf Add ReflectionConstant::getExtension() and ::getExtensionName() (#16603) 2024-11-09 11:08:02 +01:00
Niels Dossche
f8f9ac8206 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix memory leak in php_openssl_pkey_from_zval()
  Fix various memory leaks related to openssl exports
  Prevent unexpected array entry conversion when reading key
2024-11-09 11:01:36 +01:00
Niels Dossche
fd68e9ba2c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak in php_openssl_pkey_from_zval()
  Fix various memory leaks related to openssl exports
  Prevent unexpected array entry conversion when reading key
2024-11-09 11:01:29 +01:00
Niels Dossche
591fe92724 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix memory leak in php_openssl_pkey_from_zval()
  Fix various memory leaks related to openssl exports
  Prevent unexpected array entry conversion when reading key
2024-11-09 11:01:21 +01:00
Niels Dossche
994e866cf2 Fix memory leak in php_openssl_pkey_from_zval()
Closes GH-16691.
2024-11-09 10:58:44 +01:00
Niels Dossche
2f4f09f7e6 Fix various memory leaks related to openssl exports
Closes GH-16692.
2024-11-09 10:58:17 +01:00
Niels Dossche
ac8d0e57d9 Prevent unexpected array entry conversion when reading key
When passing an array, the key entry can get converted to a string if it
is an object, but this actually modifies the original array entry.
The test originally outputted:

```
array(2) {
  [0]=>
  string(...) => ...
  [1]=>
  string(0) ""
}
```

This is unexpected. Use zval_try_get_string() to prevent this behaviour.

Closes GH-16693.
2024-11-09 10:57:50 +01:00
Niels Dossche
a3b27c083f Add Dom\Element::insertAdjacentHTML() (#16614) 2024-11-09 10:52:06 +01:00
Niels Dossche
963511bffa Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/soap: fix `make check` being invoked in `ext/soap`
2024-11-08 20:48:21 +01:00
Niels Dossche
a85a5ef339 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/soap: fix `make check` being invoked in `ext/soap`
2024-11-08 20:48:06 +01:00
Maximilian Bosch
73c4fa0ea4 ext/soap: fix make check being invoked in ext/soap
On NixOS we run `make` & `make check` inside `ext/soap` which broke the test
like this:

    001+ Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'ext/soap/tests/gh15711.wsdl' : failed to load "ext/soap/tests/gh15711.wsdl": No such file or directory
    002+  in /build/php-8.3.13/ext/soap/tests/gh15711.php:29
    003+ Stack trace:
    004+ #0 /build/php-8.3.13/ext/soap/tests/gh15711.php(29): SoapClient->__construct('ext/soap/tests/...', Array)
    005+ #1 {main}
    006+   thrown in /build/php-8.3.13/ext/soap/tests/gh15711.php on line 29

Fix is to make the path dependant on `__DIR__` as it's the case in other
testcases including WSDLs.

Closes GH-16733.
2024-11-08 20:47:28 +01:00
Christoph M. Becker
e5654b75ac Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Fix typo in test name
2024-11-08 20:10:31 +01:00
Christoph M. Becker
6e6373ab89 [skip ci] Fix typo in test name 2024-11-08 20:10:14 +01:00
Christoph M. Becker
f3203f3409 Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Fix array_any() and array_all() descriptions
2024-11-08 20:02:32 +01:00
FraOre
7bbf2eae8c [skip ci] Fix array_any() and array_all() descriptions
Closes GH-16731.
2024-11-08 20:02:14 +01:00
Jakub Zelenka
efcd72029c Merge branch 'PHP-8.4' 2024-11-08 17:04:18 +01:00
Jakub Zelenka
27b4df4247 Fix 8.4 NEWS file 2024-11-08 17:01:02 +01:00
Jakub Zelenka
84400eefbb Merge branch 'PHP-8.4' 2024-11-08 16:51:19 +01:00