Bug Report
| Subject |
Details |
| Rector version |
2.3.9 |
Rector does not add the #[\Override] attribute to methods that implement an interface anymore. This worked until Rector 2.3.1, but stopped working at 2.3.2.
I was able to pinpoint the issue to a specific commit (rectorphp/rector-src@cb73a3a#diff-deb1504f632c91138aff129b8a830b448e34c2da62fa77a63171317104e969b1R140-R143). Here, skipping all interfaces but \Stringable seems intentional.
Is this a new intended behavior? Could this be made configurable?
As we also use Psalm on our projects, Rector not adding the attributes is leading to https://psalm.dev/358.
Minimal PHP Code Causing Issue
https://getrector.com/demo/e3e3c9e1-de63-4f4a-bce9-cac275474a6d
Expected Behaviour
Rector should add the #[\Override] attribute to methods that implement an interface.
Bug Report
Rector does not add the
#[\Override]attribute to methods that implement an interface anymore. This worked until Rector2.3.1, but stopped working at2.3.2.I was able to pinpoint the issue to a specific commit (rectorphp/rector-src@cb73a3a#diff-deb1504f632c91138aff129b8a830b448e34c2da62fa77a63171317104e969b1R140-R143). Here, skipping all interfaces but
\Stringableseems intentional.Is this a new intended behavior? Could this be made configurable?
As we also use Psalm on our projects, Rector not adding the attributes is leading to https://psalm.dev/358.
Minimal PHP Code Causing Issue
https://getrector.com/demo/e3e3c9e1-de63-4f4a-bce9-cac275474a6d
Expected Behaviour
Rector should add the
#[\Override]attribute to methods that implement an interface.