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

Add PHPStan #2064

Merged
merged 4 commits into from
May 24, 2022
Merged

Add PHPStan #2064

merged 4 commits into from
May 24, 2022

Conversation

franmomu
Copy link
Contributor

This PR tries to add PHPStan at level 3 that doesn't require many changes and I think it's a good start. The issues ignored are mostly about accessing dynamic fields (from Document) and through Facade.

@ruflin
Copy link
Owner

ruflin commented May 20, 2022

I'm definitively in support of adding these kind of automation to improve the code quality. Don't really have any experience with PHPStan but maybe @deguif or @thePanz can have a more detailed look?

phpstan-baseline.neon Show resolved Hide resolved
phpstan.neon Show resolved Hide resolved
@thePanz
Copy link
Collaborator

thePanz commented May 20, 2022

Nice addition, gracias @franmomu!
There are a couple of exceptions, that would need a clarification, but LGTM!
This is a good first step to have Phpstan, I still fear that increasing to higher levels will be quite hard due to the dynamic fields and the mixed parameters we have for some properties

@franmomu
Copy link
Contributor Author

Nice addition, gracias @franmomu! There are a couple of exceptions, that would need a clarification, but LGTM! This is a good first step to have Phpstan, I still fear that increasing to higher levels will be quite hard due to the dynamic fields and the mixed parameters we have for some properties

de nada! 😉 Yeah, higher levels will need more work, we'll see when we get there

@deguif
Copy link
Collaborator

deguif commented May 23, 2022

Related issue: #1943

@ruflin
Copy link
Owner

ruflin commented May 23, 2022

@thePanz Feel free to merge it in if you think it is ready.

@franmomu It would be nice to add an entry in the changelog around this addition even though it is not affecting the lib itself.

phpstan-baseline.neon Show resolved Hide resolved
@thePanz
Copy link
Collaborator

thePanz commented May 24, 2022

@deguif I lost track of your PR, sorry for that.
Should we merge this one, and rebase yours? wdyt?

@deguif
Copy link
Collaborator

deguif commented May 24, 2022

@thePanz I didn't open a PR ;)
I just did some small PRs to fix some PHPStan warnings a while ago.
Yes, we can merge this one.

@thePanz thePanz merged commit 94ed714 into ruflin:master May 24, 2022
@thePanz
Copy link
Collaborator

thePanz commented May 24, 2022

And merged @franmomu (\cc @ruflin @deguif )

@franmomu franmomu deleted the phpstan branch May 24, 2022 08:39
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