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

Potentially invalid "ImpureArgument" error thrown #2930

Closed
ADmad opened this issue Mar 7, 2020 · 3 comments
Closed

Potentially invalid "ImpureArgument" error thrown #2930

ADmad opened this issue Mar 7, 2020 · 3 comments
Labels

Comments

@ADmad
Copy link
Contributor

ADmad commented Mar 7, 2020

https://psalm.dev/r/4a9515aee0

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/4a9515aee0
<?php
new DateTimeImmutable('now', new DateTimeZone('UTC'));
Psalm output (using commit 8926f1d):

ERROR: ImpureArgument - 2:30 - Cannot pass mutable value to DateTimeImmutable::__construct

@muglug
Copy link
Collaborator

muglug commented Mar 7, 2020

DateTimeZone looks pretty immutable to me - unless anyone has any objections I’ll treat it the same as DateTimeImmutable

@localheinz
Copy link
Contributor

@muglug

That would be great!

🤓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants