[12.x] Fix timezone validation test for PHP 8.3+#55956
Merged
taylorotwell merged 2 commits intoJun 9, 2025
Merged
Conversation
Member
|
I believe we should change the timezone name instead of the output assertion. |
crynobone
reviewed
Jun 9, 2025
| $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']); |
Member
There was a problem hiding this comment.
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
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 anymoreThese changes caused the test
testValidateTimezoneWithAllWithBCOptionto fail.I fixed this by changing the expected result for these two timezones to
false, so the test now passes again.