Skip to content

Improve DateInterval inference#5486

Open
VincentLanglet wants to merge 2 commits intophpstan:2.1.xfrom
VincentLanglet:fixDateInterval
Open

Improve DateInterval inference#5486
VincentLanglet wants to merge 2 commits intophpstan:2.1.xfrom
VincentLanglet:fixDateInterval

Conversation

@VincentLanglet
Copy link
Copy Markdown
Contributor

@VincentLanglet VincentLanglet commented Apr 17, 2026

Supersed #5483
Fixes phpstan/phpstan#14479

@VincentLanglet VincentLanglet force-pushed the fixDateInterval branch 2 times, most recently from 398f653 to 58488b8 Compare April 17, 2026 08:57
@VincentLanglet VincentLanglet marked this pull request as ready for review April 27, 2026 21:56
@VincentLanglet VincentLanglet requested a review from staabm April 27, 2026 21:56
@phpstan-bot
Copy link
Copy Markdown
Collaborator

This pull request has been marked as ready for review.


foreach ($constantStrings as $constantString) {
try {
DateInterval::createFromDateString($constantString->getValue());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

in the other extensions we suppress warnings with @ on this line

and catch Throwable instead of Exception

@staabm
Copy link
Copy Markdown
Contributor

staabm commented Apr 28, 2026

I wonder why issue-bot is not reporting changes

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.

3 participants