History log of /PHP-8.3/ext/reflection/php_reflection.c (Results 1 – 25 of 949)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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 ...


# 3433dab5 05-Sep-2023 Ilija Tovilo

Revert 479e65933154f1da92e6a820000e3bd3b2392874

There were 4 different reports of this breaking behavior. This is higher than I
expected. This bug fix may still be desirable, but should

Revert 479e65933154f1da92e6a820000e3bd3b2392874

There were 4 different reports of this breaking behavior. This is higher than I
expected. This bug fix may still be desirable, but should be discussed on the
list beforehand.

Closes GH-12127

show more ...


# f78d1d0d 12-Aug-2023 Ilija Tovilo

Fix segfault in format_default_value due to unexpected enum/object

Evaluating constants at comptime can result in arrays that contain objects. This
is problematic for printing the defaul

Fix segfault in format_default_value due to unexpected enum/object

Evaluating constants at comptime can result in arrays that contain objects. This
is problematic for printing the default value of constant ASTs containing
objects, because we don't actually know what the constructor arguments were.
Avoid this by not propagating array constants.

Fixes GH-11937
Closes GH-11947

show more ...


# d9a7f674 13-Jul-2023 Máté Kocsis

Deprecate ReflectionProperty::setValue() with an incorrect 1st arg type


# f41220fe 13-Jul-2023 Máté Kocsis

Implement ReflectionMethod::createFromMethodName()


# 1a0ef2c1 06-Jul-2023 Ilija Tovilo

Revert "Remove name field from the zend_constant struct (#10954)"

This reverts commit f42992f580343931434dff2e4b2042ff945b48a1.

Closes GH-11604


# bc421791 11-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10914: OPCache with Enum and Callback functions results in segmentation fault

See linked issue for analysis.

Closes GH-11675.


# ad1b70d6 04-Jul-2023 Ilija Tovilo

Revert "Revert "Remove name field from the zend_constant struct (#10954)""

This reverts commit 9f4bd3040d2809f209d73f696b21302f311665b7.


# 9f4bd304 03-Jul-2023 Máté Kocsis

Revert "Remove name field from the zend_constant struct (#10954)"

This reverts commit f42992f580343931434dff2e4b2042ff945b48a1.

Fix GH-11423


# d5ad7510 08-Jun-2023 George Peter Banyard

More usage of known zend_str instead of C string (#11381)


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3
# 0b1d750d 11-Aug-2022 Ilija Tovilo

Allow arbitrary expressions in static variable initializer

Closes GH-9301


# 414f71a9 16-Apr-2023 Máté Kocsis

Typed class constants (#10444)

RFC: https://wiki.php.net/rfc/typed_class_constants

Co-Authored-By: Ben <7127204+moliata@users.noreply.github.com>
Co-Authored-By: Bob Weinand <31

Typed class constants (#10444)

RFC: https://wiki.php.net/rfc/typed_class_constants

Co-Authored-By: Ben <7127204+moliata@users.noreply.github.com>
Co-Authored-By: Bob Weinand <3154871+bwoebi@users.noreply.github.com>
Co-Authored-By: Ilija Tovilo <ilija.tovilo@me.com>

show more ...


# f42992f5 03-Apr-2023 Máté Kocsis

Remove name field from the zend_constant struct (#10954)

As global constant names are case-sensitive now, we don't have to store them separately above the constant table.


# dd29b66d 30-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10983: State-dependant segfault in ReflectionObject::getProperties

This is a variant of GH-10200, but in a different place.
Basically, simplexml may create a properties table that

Fix GH-10983: State-dependant segfault in ReflectionObject::getProperties

This is a variant of GH-10200, but in a different place.
Basically, simplexml may create a properties table that's packed instead
of associative. But the macro that was used to loop over the properties
table assumed that it was always associative. Replace it by the macro
that figures it out automatically which one of the two it is.

For test: Co-authored-by: jnvsor

Closes GH-10984.

show more ...


# bdf2f722 03-Mar-2023 Remi Collet

remove assert raising strange behavior with GCC 10


# 8d1c0a14 22-Feb-2023 Daniil Gentili

Fix segfault when using ReflectionFiber (fixes #10439)

Closes GH-10478


# ae164716 19-Feb-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10623: ReflectionFunction::getClosureUsedVariables() returns empty array in presence of variadic arguments

The code was missing the handling for the RECV_VARIADIC instruction.
Add

Fix GH-10623: ReflectionFunction::getClosureUsedVariables() returns empty array in presence of variadic arguments

The code was missing the handling for the RECV_VARIADIC instruction.
Additional regression test for GH-10623

Co-authored-by: Fabio Ivona <fabio.ivona@defstudio.it>

show more ...


# a11e9c9d 11-Feb-2023 Michael Voříšek

Simplify php_reflection.c, class name cannot start with backslash (#10536)

* fix comment typo

* (normalized) class name never start with backslash


# 50a2de78 02-Nov-2022 George Peter Banyard

Do not build unnecessary FCI in Reflection


# 7936c808 23-Jan-2023 Máté Kocsis

Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385)


# e186765a 29-Sep-2022 Ilija Tovilo

Throw in ReflectionMethod::__construct() when initialized with private parent method

Fixes GH-9470
Closes GH-9640


# a01dd9fe 14-Sep-2022 Bob Weinand

Revert "Port all internally used classes to use default_object_handlers"

This reverts commit 94ee4f9834743ca74f6c9653863273277ce6c61a.

The commit was a bit too late to be included i

Revert "Port all internally used classes to use default_object_handlers"

This reverts commit 94ee4f9834743ca74f6c9653863273277ce6c61a.

The commit was a bit too late to be included in PHP 8.2 RC1. Given it's a massive ABI break, we decide to postpone the change to PHP 8.3.

show more ...


# 1435fc62 02-Sep-2022 Ilija Tovilo

Private method incorrectly marked as "overwrites" in reflection

Fix GH-9409
Closes GH-9469


# 93f11d84 02-Sep-2022 Nicolas Grekas

Fix GH-8932: Provide a way to get the called-scope of closures (#9299)

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>


# 94ee4f98 24-Aug-2022 Bob Weinand

Port all internally used classes to use default_object_handlers

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>


12345678910>>...38