Skip to content
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

Fix DateTimeImmutable::sub() to not return false #8484

Closed
AndrolGenhald opened this issue Sep 14, 2022 · 1 comment · Fixed by #8583
Closed

Fix DateTimeImmutable::sub() to not return false #8484

AndrolGenhald opened this issue Sep 14, 2022 · 1 comment · Fixed by #8583
Labels
bug easy problems Issues that can be fixed without background knowledge of Psalm internal stubs/callmap

Comments

@AndrolGenhald
Copy link
Collaborator

@Ocramius The ->sub() issue is separate from this, this issue is only for ->modify(), but I do believe ->sub() was incorrect in your PR, here's an example for that special case you found: https://3v4l.org/TIWRB

It indeed gives a warning and returns a clone, so there's no false return.

Also, go get some sleep 😛

Originally posted by @AndrolGenhald in #8454 (comment)

@psalm-github-bot
Copy link

Hey @AndrolGenhald, can you reproduce the issue on https://psalm.dev ?

@AndrolGenhald AndrolGenhald added bug easy problems Issues that can be fixed without background knowledge of Psalm internal stubs/callmap labels Sep 14, 2022
orklah added a commit that referenced this issue Oct 15, 2022
…e-sub

Correct return type of DateTimeImmutable sub method stub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug easy problems Issues that can be fixed without background knowledge of Psalm internal stubs/callmap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant