| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| | |
calling __construct after instantiation
|
| |
| |
| |
| | |
We cannot `RETURN_THROWS()` here, since `return_value` is not defined.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
If `zval_update_constant_ex()` fails, an exception has already been
thrown, so we clarify that in the implementation as well.
Closes GH-6557.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix usage of casted string in ReflectionParameter ctor
|
| |
| |
| |
| | |
Fixes oss-fuzz #27755.
|
| |
| |
| |
| | |
Closes GH-6428.
|
| |
| |
| |
| |
| | |
The default value is part of the op_array in that case, but we have
no way to access it. Fail gracefully.
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit ef6adb4e27853eb19bf50bad6486311920d6af7b.
Per Ondrej's comment, this is already being used by BetterReflection
adaptors, ugh.
|
| |
| |
| |
| | |
Closes GH-6384
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make ReflectionAttribute::newInstance() respect the strict_types=1
declaration at the attribute use-site. More generally, pretend that
we are calling the attribute constructor from the place where the
attribute is used, which also means that the attribute location will
show up properly in backtraces and inside "called in" error information.
This requires us to store the attributes strict_types scope (as flags),
as well as the attribute line number. The attribute filename can be
recovered from the symbol it is used on. We might want to expose the
attribute line number via reflection as well.
See also https://externals.io/message/111915.
Closes GH-6201.
|
| |
| |
| |
| | |
Closes GH-6173
|
| |
| |
| |
| |
| |
| |
| | |
ReflectionReference::fromArrayElement(array $array, int|string $key): ?ReflectionReference
is going to be its official signature for PHP 8.0.
Closes GH-5651
|
| |
| |
| |
| |
| |
| |
| | |
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.
Closes GH-6112
|
| |
| |
| |
| | |
Closes GH-6098
|
| |
| |
| |
| | |
We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix leak on consteval exception in ReflectionClass::__toString()
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Check update constant failure in ReflectionClassConstant::__toString()
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Similar to what is done for ReflectionType itself, copy the
type name stored inside ReflectionProperty. Also make sure the
type field is always initialized for dynamic properties.
This is a non-issue in PHP 8, because we store a pointer to the
property_info there, rather than a copy.
|
| |
| |
| |
| |
| |
| | |
"Fix" in the sense of "not crash". We aren't able to actually
display the default value for this case, as there's no way to
fetch the relevant information right now.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Closes GH-5917
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From an engine perspective, named parameters mainly add three
concepts:
* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.
RFC: https://wiki.php.net/rfc/named_params
Closes GH-5357.
|
| | |
|
| |
| |
| |
| | |
Related to GH-5627
|
| |
| |
| |
| | |
Closes GH-5850
|
| |
| |
| |
| | |
This class is not safe against malicious extension / instantiation.
|
| |
| |
| |
| | |
Closes GH-5590
|
| | |
|
| |
| |
| |
| | |
Closes GH-5758
|
| | |
|
| |
| |
| |
| | |
Exposed in Symfony due to exit changes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
RFC: https://wiki.php.net/rfc/attribute_amendments
Support for attribute grouping is left out, because the short
attribute syntax RFC will likely make it obsolete.
Closes GH-5751.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix #69804: ::getStaticPropertyValue() throws on protected props
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`ReflectionClass` allows reading of the values of private and protected
constants, and also to get private and protected static methods.
Therefore getting the values of private and protected static properties
is also permissible, especially since `::getStaticProperties()` already
allows to do so.
We also allow ::setStaticPropertyValue() to modify private and
protected properties, because otherwise this method is useless, as
modifying public properties can be done directly.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix #79487: ::getStaticProperties() ignores property modifications
|
| |
| |
| |
| |
| | |
When retrieving the static class properties via reflection, we have to
cater to possible modifications.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Revert "Fix #79487: ::getStaticProperties() ignores property modifications"
|
| |
| |
| |
| | |
This reverts commit a895bb6885fbceea3e8375816969d5510d8d082e.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix #79487: ::getStaticProperties() ignores property modifications
|
| |
| |
| |
| |
| | |
When retrieving the static class properties via reflection, we have to
cater to possible modifications.
|
| |
| |
| |
| | |
Mostly reindent PHP scripts to spaces.
|
| |
| |
| |
| |
| | |
For the common ZVAL_OBJ + GC_ADDREF pattern.
This mirrors the existing ZVAL_STR_COPY API.
|