You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Skip "static::class" in "ForbiddenStaticClassConstFetchRule" #352
ForbiddenStaticClassConstFetchRule is designed to :
Avoid static access of constants, as they can change value.
However, static::class is a special PHP construct that is determined by late static binding, and it does not behave like an overridable class constant.
Therefore, I think static::class should be excluded from this rule.
This is particularly useful in traits, where static::class can be used to obtain the current class name at runtime.
Activity
TomasVotruba commentedon Oct 12, 2026
Please send failing test case with fixture 👍
TomasVotruba commentedon Oct 16, 2026
Fixed in #376