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 dateTimeModify return type provider #8462
Conversation
575ec21
to
f58545d
Compare
I think Ci failure are not related |
I think this is fine, as discussed in #8454 the It's also possible to get a |
f58545d
to
ef4e0bf
Compare
@orklah any idea what's up with the Shepherd issue? I thought I fixed it earlier so that we can't accidentally use |
Most probably Psalm is retrieving the latest version of PHP-Parser that came out a few days ago and it broke something. We'll need to take a look at it Otherwise I'm fine with the PR until we can have a working example of what we need to guard against |
ef4e0bf
to
32aedba
Compare
Tests are fixed @orklah :) |
src/Psalm/Internal/Provider/ReturnTypeProvider/DateTimeModifyReturnTypeProvider.php
Show resolved
Hide resolved
Thanks! |
…salm baseline regarding DateTimeImmutable::modify which can result `false` in some cases. In our case this is not possible and should also be fixed with the next release. Ref: https://psalm.dev/r/8f44d5ca2d Also ref: vimeo/psalm#8462
Close #8454
This is the same behavior than the Phpstan dynamicReturnTypeExtension
https://github.com/phpstan/phpstan-src/blob/f1fd385433480f87bdda1d7d8ff6887e25f003ba/src/Type/Php/DateTimeModifyReturnTypeExtension.php