We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
phpstan complains about try / catch block around creation of \DateInterval's subclass.
https://phpstan.org/r/f274678c-13d2-4296-9e49-450e0cb6fc10
There should be no errors as the constructor is not overridden and can still throw Exceptions.
If an instance of base \DateInterval is created, then phpstan correctly understands that an exception may be thrown in constructor.
The text was updated successfully, but these errors were encountered:
This got recently fixed and works in PHPStan 1.4.4.
Sorry, something went wrong.
Regression tests
86fd620
Closes phpstan/phpstan#5893 Closes phpstan/phpstan#6070 Closes phpstan/phpstan#5869 Closes phpstan/phpstan#6212 Closes phpstan/phpstan#6262 Closes phpstan/phpstan#6266 Closes phpstan/phpstan#6023 Closes phpstan/phpstan#6108 Closes phpstan/phpstan#6020 Closes phpstan/phpstan#1746 Closes phpstan/phpstan#1516 Closes phpstan/phpstan#6174 Closes phpstan/phpstan#6112 Closes phpstan/phpstan#5749 Closes phpstan/phpstan#5969 Closes phpstan/phpstan#5295 Closes phpstan/phpstan#5675 Closes phpstan/phpstan#5369 Closes phpstan/phpstan#6699 Closes phpstan/phpstan#6505
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
Bug report
phpstan complains about try / catch block around creation of \DateInterval's subclass.
Code snippet that reproduces the problem
https://phpstan.org/r/f274678c-13d2-4296-9e49-450e0cb6fc10
Expected output
There should be no errors as the constructor is not overridden and can still throw Exceptions.
If an instance of base \DateInterval is created, then phpstan correctly understands that an exception may be thrown in constructor.
The text was updated successfully, but these errors were encountered: