-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
phpstan/phpstan-src
#1105Labels
Milestone
Description
Bug report
Binary operator with throw expression does not update the type of $data in the following scope.
Code snippet that reproduces the problem
https://phpstan.org/r/fb690967-90ab-4c3f-96f1-a38dbc3a97c9
It is working with Coalesce because fixed in phpstan/phpstan-src#1063, but maybe needs a more general solution.
Expected output
All dumpType should return string type
Did PHPStan help you today? Did it make you happy in any way?
Yes! Of course. PHPStan is finding potentially buggy code everyday in our projects CI.
Also I can defenitely say we could not migrate our framework and upgrade our PHP version without PHPStan and Rector (which depends to PHPStan) !
https://getrector.org/blog/success-story-of-automated-framework-migration-from-fuelphp-to-laravel-of-400k-lines-application