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

Switch from Psalm to PHPStan level 6 #803

Merged
merged 5 commits into from
Nov 25, 2024
Merged

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented Nov 22, 2024

Needs #802

Fixes #798

@ruudk ruudk changed the title Phpstan Switch from Psalm to PHPStan Nov 22, 2024
@ruudk ruudk changed the title Switch from Psalm to PHPStan Switch from Psalm to PHPStan level 6 Nov 22, 2024
@ruudk ruudk marked this pull request as ready for review November 22, 2024 14:36
@ruudk
Copy link
Contributor Author

ruudk commented Nov 22, 2024

@frederikbosch I was able to bring it to level 6. I cannot really spend more time on it, but I think this is a good starting point.

I replaced all @psalm- specific prefixes and replaced them with @phpstan- specific ones, but ideally, we remove that prefix completely. There is no need for those vendor prefixes anymore, sine it's widely supported by PHPStorm et all.

@frederikbosch
Copy link
Member

Damn, that must have been quite some work. Fantastic work. I will schedule my review soon.

@sagikazarmark
Copy link
Collaborator

I'm not really the right person to approve this these days, so I'll just leave a couple emojis here to salute your effort

✅ 🎉 :shipit: 🍾 🥂 ❤️

@frederikbosch
Copy link
Member

I couldn't find any real code changes that were required for this change. Changes that were included were code removals. So I believe there is no reason why not merging this PR, is there?

$currencyIterator = $currencies->getIterator();
/** @psalm-var AppendIterator&Traversable<int|string, Currency> $currencyIterator */
$iterator->append($currencyIterator);
$iterator->append(new IteratorIterator($currencies->getIterator()));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@frederikbosch This was the only code change, but I think it's fine, as the test also passes.

@ruudk
Copy link
Contributor Author

ruudk commented Nov 23, 2024

@frederikbosch There is only 1 line changed, but I think that's fine. Let's ship this :shipit:

@frederikbosch frederikbosch merged commit 51ebdac into moneyphp:master Nov 25, 2024
13 checks passed
@ruudk ruudk deleted the phpstan branch November 25, 2024 09:02
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.

Switch Psalm with PHPStan
3 participants