Skip to content

[pull] master from php:master - #1127

Merged
pull[bot] merged 16 commits into
turkdevops:masterfrom
php:master
Jul 27, 2026
Merged

[pull] master from php:master#1127
pull[bot] merged 16 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Jul 27, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Sjord and others added 16 commits July 27, 2026 22:36
Move init_curl_handle() so that memory is not leaked if
curl_easy_duphandle() fails within curl_clone_obj().

init_curl_handle() allocates state that curl_free_obj() later frees, but
curl_free_obj() does nothing if ch->cp is not set. In curl_clone_obj(), defer
that allocation until a valid copied handle exists so failed duplication leaves
nothing to clean up.

Closes #22899
* PHP-8.4:
  ext/curl: fix mem leak when duphandle fails in curl_clone_obj (#22899)
* PHP-8.5:
  ext/curl: fix mem leak when duphandle fails in curl_clone_obj (#22899)
* Use a pointer to the declaring opline->lineno as unique addr, instead of the declaring opline itself

zend_partial_create() takes a 'zend_op* declaring_opline' parameter for the
purpose of building a cache key: the opline address is unique to this PFA as
long as it's in SHM.

However the declaring opline is not available when evaluating a PFA AST. Replace
the parameter by 'uint32_t* declaring_lineno'. Callers can pass
'&zend_op->lineno' or '&ast->lineno': Both are unique to the related PFA.

* zend_partial_create(): Remove the dependency on the declaring op_array

The declaring op_array is used for multiple purposes:
 * Generating a PFA name
 * Finding the filename
 * Finding whether op_array is cached, and therefore whether the PFA should be
   cached too

However it's not available when evaluating a PFA AST.

Remove the declaring_op_array argument, and pass the relevant information
directly:
 * Generate the PFA name at compile time, pass it as argument to zend_partial_create()
 * Pass the filename and a cacheable flag as argument to zend_partial_create()

* Support for PFA in constant expressions
* PHP-8.4:
  Forbid \C in UTF-8 patterns (#21139)
This reject NUL byte in the setlocale() function in the standard extension.
* PHP-8.5:
  Forbid \C in UTF-8 patterns (#21139)
Pre-bound arguments are bound to the generated closure's lexical vars:

```
function f($a, $b) {}
$f = f(1, ?);

// Generates:
$tmp = 1;
$f = function ($b) use ($tmp) {
    return f($tmp, $b);
};
```

Detect which pre-bound arguments are constant and burn them into the generated
closure instead:

```
function f($a, $b) {}
$f = f(1, ?);

// Generates:
$f = function ($b) {
    return f(1, $b);
};
```
It's not exported in a header and only used in the file it is defined
Add tests for the four error cases in
`reflection_property_check_lazy_compatible()`, as triggered by both
`ReflectionProperty::setRawValueWithoutLazyInitialization()` and
`ReflectionProperty::skipLazyInitialization()`. While some of these errors are
covered by existing tests, having all of the errors in one place will make it
easier to see the changes when the error messages are improved.
Improve error messages from `reflection_property_check_lazy_compatible()`, as
triggered by both `ReflectionProperty::setRawValueWithoutLazyInitialization()`
and `ReflectionProperty::skipLazyInitialization()`. Say "cannot" instead of
"can not", and include parentheses after the method name.
…error

Align with other Reflection exceptions for missing class properties (and
methods, constants, etc.) by changing the message to
"Property %s::$%s does not exist".
The value is a uint32_t and this may depend on the platform how it is represented
Also make private as these are not used outside of the file.
@pull pull Bot locked and limited conversation to collaborators Jul 27, 2026
@pull pull Bot added the ⤵️ pull label Jul 27, 2026
@pull
pull Bot merged commit 2bddba4 into turkdevops:master Jul 27, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants