Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Php83] Skip add #[\Override] on non-empty method from trait on AddOverrideAttributeToOverriddenMethodsRector #6471

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Nov 22, 2024

The PR:

cause regression which non-empty method override add #[\Override] attribute, which cause error, see

Fatal error: ApplyAttributeToOverrideMethodFromTrait::bar() has #[\Override] attribute, but no matching parent method exists in /in/O2TdJ on line 16

https://3v4l.org/O2TdJ

this patch try to fix it.

@samsonasik
Copy link
Member Author

Fixed 🎉

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it to have faster feedback to test ;)

@samsonasik samsonasik merged commit 9d022cf into main Nov 22, 2024
36 checks passed
@samsonasik samsonasik deleted the skip-override-non-empty-method-from-trait branch November 22, 2024 12:44
@TomasVotruba
Copy link
Member

👍

@PhilETaylor
Copy link
Contributor

Thanks, I'm out of the office so sorry for my slow feedback, as promised on X I will test this as soon as Im at a desk and can.

@PhilETaylor
Copy link
Contributor

  - Downloading rector/rector (dev-main d1b244b)
  - Downgrading rector/rector (1.2.10 => dev-main d1b244b): Extracting archive

Worked perfectly (i.e did not add Override attributes when not needed, whereas it did at the start of the week)

Thanks for addressing this so quick.

One other PHP 8.4 issue though forked the issue to rectorphp/rector-doctrine#352

@samsonasik
Copy link
Member Author

Thank you @PhilETaylor for verify, the compatible nullable param should be fixed now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants