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

[WIP] Strict comparison not null property with null #164

Closed
wants to merge 1 commit into from

Conversation

ossinkine
Copy link
Contributor

This is the fix for the issue described here phpstan/phpstan#2618.

@ondrejmirtes Could you please give an advice how to add parameter check and how to test this behavior with parameter? If you show examples it would be enough.

And in general, am I moving in the right direction?

@ossinkine
Copy link
Contributor Author

@ondrejmirtes Could you steer me in the right direction?

@ondrejmirtes
Copy link
Member

@ossinkine See for example how other scalar parameters get into MutatingScope constructor, like bool $treatPhpDocTypesAsCertain, and try to add another.

@ondrejmirtes
Copy link
Member

As for testing, that's not going to be easy unless you want to run whole PHPStan with exec() and asserting the JSON result. Because the parameter gets into MutatingScope somewhere deep down and it's not easy to override that in an integration test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants