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
DateInterval::createFromDateString can be false #7758
Conversation
Thanks! Can you also do this change in Callmap_historical? There should be a match between Callmap (who is the current state) and another Callmap file (who'll show when this particular signature was introduced) |
@orklah, changes made. |
Thanks! |
And congrats for your first PR! |
DateInterval::createFromDateString can be false
Was this possibly reverted? Does not create an issue in 4.26 nor in latest 5.x commit: |
I found these snippets: https://psalm.dev/r/49ce1d4e62<?php
function foo(): DateInterval
{
return DateInterval::createFromDateString('foo');
}
|
@boesing Still works, that's just ignoreInternalFunctionFalseReturn being annoying. The fact that there are so many config values that most people never look at, and the amount of work it takes to go through all of them manually, is what motivated me to open #7630, but I've been short on time lately. If you or someone else wants to go through the options and decide what value is "strictest" for each of them I would guess the actual implementation of it should be relatively simple. |
I found these snippets: https://psalm.dev/r/760586cee1<?php
function foo(): DateInterval
{
$foo = DateInterval::createFromDateString('foo');
/** @psalm-trace $foo */
return $foo;
}
|
Fixes #7747