Skip to content

ext/date: applied fixers to improve test robustness - #23039

Open
NickSdot wants to merge 1 commit into
php:masterfrom
NickSdot:test/hardening/ext-date
Open

ext/date: applied fixers to improve test robustness#23039
NickSdot wants to merge 1 commit into
php:masterfrom
NickSdot:test/hardening/ext-date

Conversation

@NickSdot

@NickSdot NickSdot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Asserts error class; extracted from: #22799

try {
new DatePeriod($date, new DateInterval('P1D'), 2);
} catch (Error $e) {
echo get_class($e), ': ', $e->getMessage(), "\n";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This (and following) safe us a function call; not style-only.

c(Asia/Tokyo): 2015-4-1 <--> 2015-4-29
int(0)
int(28)

@NickSdot NickSdot Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This (and following) removes double empty last line.

var_dump( timezone_offset_get($tz, $invalid_obj) );
} catch (Error $ex) {
var_dump($ex->getMessage());
echo "\n";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Bloat.

@NickSdot
NickSdot marked this pull request as ready for review August 4, 2026 15:20
@NickSdot
NickSdot requested a review from derickr as a code owner August 4, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant