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 type checking via phpstan #5

Merged
merged 1 commit into from
Jun 6, 2022
Merged

Conversation

olivernybroe
Copy link

Added type checking via phpstan, unfortunately it is not flawless as the tests for accessing the protected and private properties fails.

Couldn't really find a way to fix that without having to do a phpstan extension.

To run it

vendor/bin/phpstan --config=types/phpstan.neon.dist

@freekmurze
Copy link
Member

Is this one ready to be merged in?

@olivernybroe
Copy link
Author

@freekmurze well I'll let that be up to you, the phpstan will fail on it, because of protected and private properties.
However the template + mixin tag will at least let phpstan know what the original class.

@fabio-ivona
Copy link

btw seems that jetbrains will add support for generics in @mixin soon 👀

https://youtrack.jetbrains.com/issue/WI-64022/Support-mixin-with-template

@freekmurze freekmurze marked this pull request as ready for review June 6, 2022 14:01
@freekmurze freekmurze merged commit 2e4250a into spatie:main Jun 6, 2022
@freekmurze
Copy link
Member

Let's go for it!

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.

3 participants