Skip to content

Mark overriden methods with #[\Override] attribute - #572

Merged
Ocramius merged 1 commit into
maglnet:4.17.xfrom
fredden:feature/psalm-upgrade-new-rules/MissingOverrideAttribute
Feb 20, 2025
Merged

Ocramius merged 1 commit into
maglnet:4.17.xfrom
fredden:feature/psalm-upgrade-new-rules/MissingOverrideAttribute

Conversation

@fredden

@fredden fredden commented Feb 20, 2025

Copy link
Copy Markdown
Contributor

In Psalm version 6.6.0, the MissingOverrideAttribute rule was enabled for all PHP versions.

This should fix some of the test failures in #569

In Psalm version 6.6.0, the MissingOverrideAttribute rule was enabled for all
PHP versions.
@fredden
fredden force-pushed the feature/psalm-upgrade-new-rules/MissingOverrideAttribute branch from bac8f0a to 096e6e9 Compare February 20, 2025 12:46

@Ocramius Ocramius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I think #[\Override] is wasting everyone's time here, I'm willing to try this experiment on this repo, for now :-)

Thanks @fredden!

@Ocramius Ocramius added enhancement dependencies Pull requests that update a dependency file labels Feb 20, 2025
@Ocramius Ocramius added this to the 4.17.0 milestone Feb 20, 2025
@Ocramius
Ocramius merged commit 88f5a42 into maglnet:4.17.x Feb 20, 2025
@fredden
fredden deleted the feature/psalm-upgrade-new-rules/MissingOverrideAttribute branch February 20, 2025 13:05
@fredden

fredden commented Feb 20, 2025 •

Copy link
Copy Markdown
Contributor Author

I also wonder about the usefulness of this attribute in some of these cases. For example, when an interface defines a signature, and a class implements that method. Perhaps this should be raised with the Psalm team?

Edit: it looks like this has already been raised upstream: vimeo/psalm#11305

@Ocramius

Copy link
Copy Markdown
Collaborator

Yeah, Psalm upstream is acting erratically from a maintenance PoV: let's hope it gets more stable, because ATM it looks like we're playing a game of whack-a-mole with iterations that are quickly rushed out, and lead to tons of work from our end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants