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
Zero occurrences in src/ despite deep hierarchies. Add it to overriding methods in framework code — transformers implementing transform(), SourceTransformingLoader::filter() (overrides php_user_filter), the AbstractJoinpoint/AbstractInvocation/AbstractInterceptor hierarchies, Pointcut::matches() implementations — and replace bare @inheritDoc docblocks where the attribute is the enforced version.
Caveat: never add #[\Override] to test-project fixture classes that get woven — the weaver strips it from intercepted methods for trait-alias reasons (stripOverrideAttributeFromInterceptedMethods()), and fixtures are meant to exercise that path deliberately, not accidentally.
Summary
From the PHP 8.5 support audit (PR #597); user-approved modernization batch.
Typed class constants (8.3)
Exactly one constant in
src/is typed (AbstractMethodInvocation::TRAIT_ALIAS_PREFIX). Add native types to the rest — concentrated targets:src/Core/AspectContainer.php:27-67(9 string constants)src/Aop/Features.php:24-54(int constants; see also the dead-flag cleanup in Process/cleanup: dead PARAMETER_WIDENING flag, orphaned test fixtures, lost golden coverage, PHPStan on 8.5 in CI #610)src/Aop/Pointcut.php:45-53(9 intKIND_*constants)src/Proxy/Generator/MethodGenerator.php:37-39,src/Proxy/Generator/ClassGenerator.php:37-39,src/Proxy/Generator/PropertyGenerator.php:27-34(FLAG_*)src/Proxy/Generator/TypeGenerator.php:41(BUILTIN_TYPES→const array),src/Proxy/EnumProxyGenerator.php:56,66src/Instrument/ClassLoading/CachePathManager.php:32,37,src/Instrument/Transformer/WeavingTransformer.php:42#[\Override](8.3)Zero occurrences in
src/despite deep hierarchies. Add it to overriding methods in framework code — transformers implementingtransform(),SourceTransformingLoader::filter()(overridesphp_user_filter), theAbstractJoinpoint/AbstractInvocation/AbstractInterceptorhierarchies,Pointcut::matches()implementations — and replace bare@inheritDocdocblocks where the attribute is the enforced version.Caveat: never add
#[\Override]to test-project fixture classes that get woven — the weaver strips it from intercepted methods for trait-alias reasons (stripOverrideAttributeFromInterceptedMethods()), and fixtures are meant to exercise that path deliberately, not accidentally.