You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before digging into php-src to see if it would still return false I explored changing the stubs in phpstan (because with the change in #385 in place, I get phpstan errors about using deprecated functions, but if I remove use function Safe\mktime; then I get the possible false return type, which PHPStan catches in other places, like when passed to the date function).
In #385,
mktime
was deprecated in this lib, but technically I thinkmktime
will still returnfalse
in an unusual situation:https://github.com/php/php-src/blob/master/ext/date/php_date.c#L1156
Before digging into php-src to see if it would still return
false
I explored changing the stubs in phpstan (because with the change in #385 in place, I get phpstan errors about using deprecated functions, but if I removeuse function Safe\mktime;
then I get the possiblefalse
return type, which PHPStan catches in other places, like when passed to thedate
function).phpstan/phpstan-src#1768
While it does seem to be an unusual situation (I can't make it return
false
on 3v4l.org https://3v4l.org/SZSk4), it's still technically correct.We have to pin this lib at 2.3.7 to avoid these phpstan errors, should
mktime
andgmmktime
be "undeprecated"?The text was updated successfully, but these errors were encountered: