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
DX: PHPStan improvements #6868
DX: PHPStan improvements #6868
Conversation
Pull Request Test Coverage Report for Build 4600881262
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great story reading over commit logs!
i left some commits
e77719c
to
085407c
Compare
@keradus sorry for the force push - I wanted to rebase branch to be up-to-date with master and then push only what was provided before + new commits in separate push (so Github could display compare view only for new commits), but I forgot and pushed everything at once 😩. I hope you used "Viewed" checkboxes and Github handle it properly for files that were not changed within rebase (Gitlab can do it, so I have such habit). |
9f1de92
to
744fda5
Compare
744fda5
to
7de2ba5
Compare
716ff79
to
480ff3b
Compare
911b9c8
to
35f6b49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Wirone one last thing, can you update .gitattributes
?
Make `phpstan.neon` ignored by Git and allow people override default config (helpful especially for `editorUrl` and `parallel`). https://phpstan.org/config-reference#config-file
This will allow us to keep track of `ignoreErrors` and do not let outdated ignore rules be kept there.
Introduce PHPStan type aliases to re-use array shape within single file.
With explicit baseline file we know exactly where errors are it's easier to fix them. Also, with previous approach it was possible to fix N issue and introduce N other issues at the same time and PHPStan wouldn't complain. Now, it will report unmatched (fixed) errors and newly introduced ones.
Let's do not pretend there's some kind of more sophisticated type, use array shape in all places. In the future it should be replaced with some kind of DTO.
Reuse path stored in variable instead concatenating the same values again. Co-authored-by: Dariusz Rumiński <dariusz.ruminski@gmail.com>
35f6b49
to
17f5f70
Compare
Thank you @Wirone |
Details in commits' messages, but let's summarise:
phpstan.neon
(default config moved tophpstan.dist.neon
)Plan for the future (in separate PRs):