Repository navigation
[IT9PE1-33922] Accept backward-compatible timezone aliases - #99
Merged
Merged
Conversation
\DateTimeZone accepts aliases such as US/Hawaii, so a value it built can be stored and then fail the Timezone constraint on every later update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt (review gate finding) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
🤖 Review gate — 0 error / 0 open warning / 1 info Human review needed: no — one-line widening of the allow-list to 🔍 Reviewed at 🔧 Fixed before this verdict (1) — in
🧪 Coverage: 1/1 behavior changes covered |
|
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.



Why
\DateTimeZoneaccepts backward-compatible aliases such asUS/Hawaii, butTimezoneValidatoronly accepted\DateTimeZone::listIdentifiers(), which leaves them out. A value PHP builds without complaint could therefore be stored, then fail the constraint on every later validation of the entity holding it.What
TimezoneValidatorchecks against\DateTimeZone::listIdentifiers(\DateTimeZone::ALL_WITH_BC).US/Hawaiiis missing from some), and it is skipped when the platform has none.US/Atlantiskeeps the rejection path covered.Test plan
phpunit,phpcs,phpstangreen locally (PHP 8.4)0 violation expected. Got 1.)Shipping
Merging this PR ships nothing: it needs a semver tag / GitHub release, then a
composer require assoconnect/validator-bundle:^2.51bump PR in the backend. Two reviews total.Refs IT9PE1-33922
🤖 Generated with Claude Code