Skip to content

Check datetime instantiation #380

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

Merged
merged 2 commits into from
Nov 24, 2020

Conversation

b1rdex
Copy link
Contributor

@b1rdex b1rdex commented Nov 23, 2020

@b1rdex b1rdex force-pushed the datetime-instantiation branch from 532cd52 to 8515526 Compare November 23, 2020 12:41
Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And finally, please fix the build (Failures on PHP 8 are fine - they're on master already.)

@b1rdex b1rdex force-pushed the datetime-instantiation branch from 8515526 to 4ddfe40 Compare November 23, 2020 15:10
Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually needs fixing:

Cannot access offset 'warnings' on array('warning_count' => int,     
         'warnings' => array<int, string>, 'error_count' => int, 'errors' =>  
         array<int, string>)|false.

@b1rdex
Copy link
Contributor Author

b1rdex commented Nov 23, 2020 via email

@ondrejmirtes
Copy link
Member

@b1rdex That's easy: https://3v4l.org/HBq0q

@ondrejmirtes
Copy link
Member

It tells me that you haven't tested a case where the rule should not report anything :)

@b1rdex
Copy link
Contributor Author

b1rdex commented Nov 23, 2020 via email

@b1rdex b1rdex force-pushed the datetime-instantiation branch from 4ddfe40 to db4aba0 Compare November 24, 2020 02:10
@ondrejmirtes ondrejmirtes merged commit aa9a1ff into phpstan:master Nov 24, 2020
@ondrejmirtes
Copy link
Member

Thank you!

@b1rdex b1rdex deleted the datetime-instantiation branch November 24, 2020 09:50
@ondrejmirtes
Copy link
Member

FYI I removed reporting warnings because it's not that useful: https://3v4l.org/TGsaG

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

Successfully merging this pull request may close these issues.

Check constant string dates validity
2 participants