History log of /PHP-8.3/ext/reflection/php_reflection.c (Results 26 – 50 of 949)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22
# 565a416e 28-Jul-2022 Ilija Tovilo

Fix attribute target validation on fake closures

Fixes GH-8982
Closes GH-9173


# e4d79ce2 23-Jul-2022 Máté Kocsis

Declare ext/reflection constants in stubs (#9111)


Revision tags: php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1
# 4d8dd8d2 19-Jul-2022 Go Kudo

Implement Random Extension

https://wiki.php.net/rfc/rng_extension
https://wiki.php.net/rfc/random_extension_improvement


# c6eb5dc5 18-Jul-2022 Dmitry Stogov

Fix possible crash in case of exception

Fixes oss-fuzz #49068


# c650e67c 07-Jul-2022 Pierrick Charron

Fixed bug GH-8943 Reflection::getModifiersNames() with readonly modifier


Revision tags: php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1
# 0ae6a675 12-Jun-2022 George Peter Banyard

Add true as a type (#8326)

RFC: https://wiki.php.net/rfc/true-type


Revision tags: php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17
# ddc0b490 10-Mar-2022 Ilija Tovilo

Allow arbitrary const expressions in backed enums

Closes GH-7821
Closes GH-8190
Closes GH-8418


# b40ae808 07-Jun-2022 George Peter Banyard

Convert iterable into an internal alias for Traversable|array (#7309)

This does a compile time transformation of ``iterable`` into ``Traversable|array`` which simplifies some of the LSP vari

Convert iterable into an internal alias for Traversable|array (#7309)

This does a compile time transformation of ``iterable`` into ``Traversable|array`` which simplifies some of the LSP variance handling.

The arginfo generation script from stubs is updated to produce a union type when it encounters the type ``iterable``
Extension functions which do not regenerate the arginfo, or write them manually are still supported by mimicking the compile time transformation while registering the function.

Type Reflection is preserved for single ``iterable`` (and ``?iterable``) to produce a ReflectionNamedType with name ``iterable``, however usage of ``iterable`` in union types will be converted to ``array|Traversable``

show more ...


# 088e5677 06-Jun-2022 Dmitry Stogov

Fix memory leak

This fixes oss-fuzz #47791


# 7850c103 16-May-2022 Máté Kocsis

Add support for readonly classes (#7305)

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


# f590782b 04-May-2022 Ollie Read

Add ReflectionMethod::hasPrototype method

Closes GH-8487.


# be11bcb0 05-May-2022 Nicolas Grekas

Add ReflectionFunction::isAnonymous()

Closes GH-8499.


# fc04a6eb 03-May-2022 Máté Kocsis

Throw when calling ReflectionAttribute::__construct()

ReflectionAttribute::__construct() accepted any number of parameters until now, because parameter validation was missing. Even though th

Throw when calling ReflectionAttribute::__construct()

ReflectionAttribute::__construct() accepted any number of parameters until now, because parameter validation was missing. Even though this was unlikely to be an issue in practice (since the method is private), the problem is fixed by always throwing an exception.

show more ...


# ef5478b8 03-May-2022 Máté Kocsis

Reorder param parsing and reflection object retrieval


# 1944c14c 28-Apr-2022 Ilija Tovilo

Fix ReflectionProperty::__toString() of properties containing enums

Fix GH-8444


# d0f1b987 22-Apr-2022 Ollie Read

Fix GH-8421: Attributes that target functions are not valid for anonymous functions defined within a method

Closes GH-8424


# 6039c07a 08-Apr-2022 George Peter Banyard

Allow ``null`` and ``false`` as standalone types (#7546)

RFC: https://wiki.php.net/rfc/null-standalone-type

Also a drive-by consistency fix for error messages.


Revision tags: php-8.1.4RC1, php-8.0.17RC1
# 0d266a24 16-Feb-2022 Christoph M. Becker

Fix GH-8080: ReflectionClass::getConstants() depends on def. order

When we need to evaluate constant ASTs, we always have to do that in
the scope where the constant has been defined, whi

Fix GH-8080: ReflectionClass::getConstants() depends on def. order

When we need to evaluate constant ASTs, we always have to do that in
the scope where the constant has been defined, which may be a parent
of the `ReflectionClass`'s scope.

Closes GH-8106.

show more ...


Revision tags: php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15
# 7e6558ed 12-Jan-2022 Dmitry Stogov

Fix ext/zend_test/tests/observer_bug81430_2.phpt failure


# f7c3f6e7 12-Jan-2022 Dmitry Stogov

Fix ext/zend_test/tests/observer_bug81430_2.phpt failure


# 2f6a06cc 05-Jan-2022 Benjamin Eberlei

Fix #81430: Attribute instantiation leaves dangling pointer

By switching attribute constructor stackframe to be called via
trampoline the stack allocation is not causing dangling pointer

Fix #81430: Attribute instantiation leaves dangling pointer

By switching attribute constructor stackframe to be called via
trampoline the stack allocation is not causing dangling pointers
in the zend_observer API anymore.

Co-Authored-By: Florian Sowade <f.sowade@suora.com>
Co-Authored-By: Christopher Becker <cmbecker69@gmx.de>
Co-Authored-By: Dmitry Stogov <dmitry@zend.com>

Closes GH-7885.

show more ...


Revision tags: php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27
# 59dd4fd7 02-Dec-2021 Christoph M. Becker

Fix #81681: ReflectionEnum throwing exceptions

Enums are neither instantiable nor cloneable.

Closes GH-7707.


Revision tags: php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0
# 6641e3b8 17-Nov-2021 Nikita Popov

Fix bug #81630: Don't claim known hash in getTraitAliases()

We don't intern this string, and this code is not particularly
performance critical in the first place, so just drop the the

Fix bug #81630: Don't claim known hash in getTraitAliases()

We don't intern this string, and this code is not particularly
performance critical in the first place, so just drop the the
assumption.

show more ...


Revision tags: php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6
# 90b7bde6 03-Nov-2021 Dmitry Stogov

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
(ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
(packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
- sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
- zend_hash_sort_ex() may require converting packed arrays to hash.

show more ...


Revision tags: php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32
# fb5cff12 20-Oct-2021 Nikita Popov

Print array defaults in reflection

As a followup to f34114b1fb68302ad51929890d3fb2d9cbba024b print
the contents of arrays rather than just a generic "Array" marker.
Also drop the tru

Print array defaults in reflection

As a followup to f34114b1fb68302ad51929890d3fb2d9cbba024b print
the contents of arrays rather than just a generic "Array" marker.
Also drop the truncation on strings. As we no longer resolve
constants, there should be less concerns about printing very
large strings here. If someone thought it was a good idea to use
a 10k character strings as a default value in code, then it should
be fine for us to print it in reflection as well.

show more ...


12345678910>>...38