#
f8d1864b |
| 01-May-2024 |
Ilija Tovilo |
Delay #[Attribute] arg validation until runtime Fixes GH-13970 Closes GH-14105 We cannot validate at compile-time for multiple reasons: * Evaluating the argument naivel
Delay #[Attribute] arg validation until runtime Fixes GH-13970 Closes GH-14105 We cannot validate at compile-time for multiple reasons: * Evaluating the argument naively with zend_get_attribute_value can lead to code execution at compile time through the new expression, leading to possible reentrance of the compiler. * Even if the evaluation was possible, it would need to be restricted to the current file, because constant values coming from other files can change without affecting the current compilation unit. For this reason, validation would need to be repeated at runtime anyway. * Enums cannot be instantiated at compile-time (the actual bug report). This could be allowed here, because the value is immediately destroyed. But given the other issues, this won't be needed. Instead, we just move it to runtime entirely. It's only needed for ReflectionAttribute::newInstance(), which is not particularly a hot path. The checks are also simple.
show more ...
|
#
b8f10dec |
| 04-Feb-2024 |
David CARLIER |
ZEND_ELEMENT_COUNT usage reduction. (#13324) clang 18 is going to be released and in the meantime the counted_by attribute usage had been constrained to true flexible arrays, typical
ZEND_ELEMENT_COUNT usage reduction. (#13324) clang 18 is going to be released and in the meantime the counted_by attribute usage had been constrained to true flexible arrays, typical cases such as type name[1] ZEND_ELEMENT_COUNT(size) no longer build.
show more ...
|
#
cc2bf119 |
| 13-Nov-2023 |
David CARLIER |
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650) zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays. It is mostly for ubsan and
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650) zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays. It is mostly for ubsan and helping array bound checking.
show more ...
|
#
49ef6e20 |
| 29-Jun-2023 |
Tim Düsterhus |
RFC: Add #[Override] attribute (#9836) * Add #[Override] attribute * Move #[\Override] tests into Zend/tests/attributes/override/ * Check `check_only` before removing `ZEND
RFC: Add #[Override] attribute (#9836) * Add #[Override] attribute * Move #[\Override] tests into Zend/tests/attributes/override/ * Check `check_only` before removing `ZEND_ACC_OVERRIDE` * NEWS/UPGRADING for #[\Override]
show more ...
|
#
342e18f1 |
| 12-Jul-2022 |
Tim Düsterhus |
Support the actual `#[\SensitiveParameter]` attribute in stubs (#8836)
|
#
9f29e2d7 |
| 05-Jul-2022 |
Bob Weinand |
Allow for arbitrary (class) attributes in stubs This can be easily extended to other types of attributes. Closes #8839.
|
#
49951165 |
| 12-Apr-2022 |
Tim Düsterhus |
Add zend_mark_function_parameter_as_sensitive()
|
#
90851977 |
| 21-Dec-2021 |
Tim Düsterhus |
Implement the "Redacting parameters in back traces" RFC https://wiki.php.net/rfc/redact_parameters_in_back_traces
|
#
902d6439 |
| 11-Oct-2021 |
Nikita Popov |
Deprecate implicit dynamic properties Writing to a proprety that hasn't been declared is deprecated, unless the class uses the #[AllowDynamicProperties] attribute or defines __get()/
Deprecate implicit dynamic properties Writing to a proprety that hasn't been declared is deprecated, unless the class uses the #[AllowDynamicProperties] attribute or defines __get()/__set(). RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
show more ...
|
#
3e01f5af |
| 15-Jan-2021 |
Nikita Popov |
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
show more ...
|
#
5686c16d |
| 23-Sep-2020 |
Nikita Popov |
Honor strict_types=1 for attributes, improve backtraces Make ReflectionAttribute::newInstance() respect the strict_types=1 declaration at the attribute use-site. More generally, pretend
Honor strict_types=1 for attributes, improve backtraces 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.
show more ...
|
#
fa8d9b11 |
| 28-Aug-2020 |
George Peter Banyard |
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functio
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002
show more ...
|
#
d92229d8 |
| 06-Apr-2020 |
Nikita Popov |
Implement named parameters From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument nam
Implement named parameters 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.
show more ...
|
#
053ef28b |
| 28-Jun-2020 |
Martin Schröder |
Implement Attribute Amendments. RFC: https://wiki.php.net/rfc/attribute_amendments Support for attribute grouping is left out, because the short attribute syntax RFC will likely
Implement Attribute Amendments. 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.
show more ...
|
#
5b4c4bbe |
| 05-Jun-2020 |
Nikita Popov |
Free attribute validators on shutdown
|
#
a7908c2d |
| 24-May-2020 |
Benjamin Eberlei |
Add Attributes Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
|