Introduce CountryTimezones class and update timezone handling in Country.#23
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8ced246d3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This pull request refactors timezone handling by extracting timezone functionality to an external tiny-blocks/time package. The PR introduces a new CountryTimezones class (renamed from Timezones) that wraps the external Timezones class, delegates timezone operations to it, and maintains backward compatibility for country-specific timezone operations.
Changes:
- Removed internal
TimezoneandInvalidTimezoneclasses in favor of externaltiny-blocks/timepackage - Renamed
Timezonesclass toCountryTimezonesto better reflect its domain-specific purpose - Updated method name from
findByIdentifiertofindByIdentifierOrUtcto make fallback behavior explicit
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Timezone.php | Removed internal Timezone value object class (moved to external package) |
| src/Internal/Exceptions/InvalidTimezone.php | Removed internal exception class (handled by external package) |
| src/CountryTimezones.php | Renamed from Timezones to CountryTimezones; now wraps external Timezones class and delegates operations |
| src/Country.php | Updated type hint from Timezones to CountryTimezones |
| tests/CountryTest.php | Updated imports and method calls; removed tests for now-external Timezone class validation |
| composer.json | Added dependency on tiny-blocks/time ^1.1 |
| README.md | Updated documentation to reflect API changes and removed Timezone class documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.