Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[12.x] Fix timezone validation test for PHP 8.3+ #55956

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
Jun 9, 2025

Conversation

platoindebugmode
Copy link
Contributor

What this PR does

This pull request updates the timezone validation test in Laravel.

In PHP 8.3 and newer:

  • 'Europe/Kiev' is no longer a valid timezone (now it's 'Europe/Kyiv')
  • 'GB' is also not listed as a valid timezone anymore

These changes caused the test testValidateTimezoneWithAllWithBCOption to fail.

I fixed this by changing the expected result for these two timezones to false, so the test now passes again.

@crynobone
Copy link
Member

I believe we should change the timezone name instead of the output assertion.

@@ -5947,7 +5947,7 @@ public function testValidateTimezoneWithAllWithBCOption()
$v = new Validator($trans, ['foo' => 'GMT'], ['foo' => 'Timezone:All_with_BC']);
$this->assertTrue($v->passes());

$v = new Validator($trans, ['foo' => 'GB'], ['foo' => 'Timezone:All_with_BC']);
$v = new Validator($trans, ['foo' => 'Europe/London'], ['foo' => 'Timezone:All_with_BC']);
Copy link
Member

Choose a reason for hiding this comment

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

The test is to cover Timezone:All_with_BC, is there any other alternative GB that's still working as a backward compatible example: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

@taylorotwell taylorotwell merged commit 78cf4ee into laravel:12.x Jun 9, 2025
59 checks passed
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.