Skip to content

GH-22684: Make Reflection(Class)Constant::__toString() print booleans as booleans - #23548

Merged
DanielEScherzer merged 3 commits into
php:PHP-8.6from
DanielEScherzer:reflection-print-booleans
Sep 22, 2026
Merged

DanielEScherzer merged 3 commits into
php:PHP-8.6from
DanielEScherzer:reflection-print-booleans

Conversation

@DanielEScherzer

Copy link
Copy Markdown
Member

Fixes #22684

@ndossche ndossche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost right. In favor of the change.

Comment thread sapi/cli/tests/006.phpt Outdated
@DanielEScherzer
DanielEScherzer changed the base branch from master to PHP-8.6 September 22, 2026 20:17
Add regression tests for the output of `ReflectionClassConstant::__toString()`
and `ReflectionConstant::__toString()` when the value of the constant is
boolean `true` or `false`. The `true` cases are already covered by some
existing tests, but it seems that the `false` cases are currently untested.
Updates the output of `ReflectionClassConstant::__toString()` and
`ReflectionConstant::__toString()`, as well as the other ways that class
constants are printed, e.g. `ReflectionClass::__toString()`.
@DanielEScherzer
DanielEScherzer force-pushed the reflection-print-booleans branch from d385354 to 77d4c7f Compare September 22, 2026 20:24
@DanielEScherzer
DanielEScherzer merged commit 77d4c7f into php:PHP-8.6 Sep 22, 2026
18 checks passed
@DanielEScherzer
DanielEScherzer deleted the reflection-print-booleans branch September 22, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reflection(Class)Constant::__toString() should print booleans as booleans

3 participants