Skip to content

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.

$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