[pull] master from php:master - #948
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )