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

chore: upgrade phpstan to v2 #821

Merged
merged 2 commits into from
Dec 7, 2024
Merged

Conversation

blackshadev
Copy link
Contributor

What

  • Upgrade phpstan to v2
  • Upgrade required dependencies to other versions
    • rector v2.0-rc2
    • spaze/phpstan-disallowed-calls v4
  • Remove phpat, it doesn't yet support phpstan, and I cannot see any progress on it. I have found this issue , but no branches revering it etc.

Why not wait?

Well , as it stands, phpstan doesn't allot for property hooks, I tried a property hook in an interface and phpstan paniced to the point it became unusable. In my opinion, I rather have php 8.4 features, than the features added by phpat, which can be re-added when phpat does provide phpstan 2.0 support.

Why the baseline

I rather introduce phpstan 2.0 early and fix the issues from the baseline later, the alternative is my trying to clean up while others keep on piling new issues without them even knowing they did it (because phpstan 2 has become more strict)

@innocenzi innocenzi changed the title feat(dev): upgrade phpstan to v2 chore: upgrade phpstan to v2 Dec 6, 2024
@innocenzi innocenzi requested a review from aidan-casey December 6, 2024 23:23
Copy link
Member

@aidan-casey aidan-casey left a comment

Choose a reason for hiding this comment

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

@blackshadev overall looks good, thank you! Just a few comments.

phpstan-baseline.neon Show resolved Hide resolved
tests/Architecture/ArchitectureTestCase.php Show resolved Hide resolved
@brendt
Copy link
Member

brendt commented Dec 7, 2024

Nice!

@blackshadev
Copy link
Contributor Author

Pipeline fixed, newly introduced code from main had a new error in it, adding it to the baseline for now.

@brendt
Copy link
Member

brendt commented Dec 7, 2024

Let's go!

@brendt brendt merged commit be20015 into tempestphp:main Dec 7, 2024
60 checks passed
@carlosas
Copy link

carlosas commented Dec 27, 2024

FYI @blackshadev @aidan-casey @brendt
PHPat now supports PHPStan 2.0 https://github.com/carlosas/phpat/releases/tag/0.11.0
Support for PHP 8.4 (like catching dependencies in property hooks) is WIP

@aidan-casey
Copy link
Member

Thank you, @carlosas! Appreciate your continued work on the project!

@blackshadev
Copy link
Contributor Author

FYI @blackshadev @aidan-casey @brendt PHPat now supports PHPStan 2.0 https://github.com/carlosas/phpat/releases/tag/0.11.0 Support for PHP 8.4 (like catching dependencies in property hooks) is WIP

Thanks, created an MR to re-add it #873

@blackshadev blackshadev deleted the phpstan-v2 branch December 27, 2024 13:33
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.

4 participants