lint/php-8.3/prefer-dynamic-class-constant
In the modernize set. Safe fix. Gated by php-8.3.
What it does
constant(Example::class . ‘::’ . $constName) to dynamic class const fetch Example::{$constName}
Configuration
[lint.rules]
"php-8.3/prefer-dynamic-class-constant" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
DynamicClassConstFetch(rector)