1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext
Daniel Scherzer ca0414e64d Reflection: show the type of object constants used as default properties
When a property default is based on a global constant, show the type of the
default. Previously, `format_default_value()` assumed that non-scalar and
non-array defaults were always going to be `IS_CONSTANT_AST` pointers, and when
the AST expression had been evaluated and produced an object, depending on when
the `ReflectionClass` or `ReflectionProperty` instance had been created, the
default was shown as one of `callable` or `__CLASS__`.

Instead, if the default value is an object (`IS_OBJECT`), show the type of that
object.

Add test cases for both of the `callable` and `__CLASS__` cases to confirm that
they now properly show the type of the constant.

Closes GH-15902.
Closes GH-17781.
2025-02-21 09:32:10 +01:00
..
2025-02-05 19:22:51 +01:00
2025-01-17 11:53:10 +00:00
2024-10-13 21:12:46 +02:00
2024-12-18 11:38:44 +00:00
2024-11-27 19:54:06 +00:00
2024-11-10 20:16:33 +00:00
2025-02-02 13:37:21 +01:00
2024-08-06 16:54:58 +02:00
2024-10-03 21:11:25 +02:00
2025-02-16 00:16:57 +01:00
2024-06-28 20:14:20 +02:00
2025-02-17 00:07:55 +01:00
2025-02-14 23:09:57 +01:00