Add DatePeriod dynamic return type#958
Conversation
|
Restore the original stub with |
89d17c7 to
1166c34
Compare
|
I rebase but some tests failed |
|
DatePeriod::getRecurrences() was added in PHP 7.2. You can run the test only on newer PHP versions if you put the yield in a condition. It's already done many times in NodeScopeResolverTest. |
There was a problem hiding this comment.
This logic isn't sufficient. You also need to test scenarios like when the third argument is mixed or DateTimeInterface|int.
There was a problem hiding this comment.
I made a more explicit version
f3e0636 to
f0ad821
Compare
stubs/date.stub
Outdated
There was a problem hiding this comment.
One more thing - DatePeriod needs to be added here in the config:
Line 25 in d92d616
There was a problem hiding this comment.
Simiarly to what was done here: phpstan/phpstan-doctrine@8061e5f
Co-authored-by: Markus Staab <maggus.staab@googlemail.com>
f705fee to
fad3849
Compare
fad3849 to
b1950fa
Compare
b1950fa to
1676836
Compare
|
Thank you! |
|
Thank you for your support It was interesting to discover how PHPStan works |
Resolve phpstan/phpstan#5953
Previous PR : #762