Skip to content

Introduce CountryTimezones class and update timezone handling in Country.#23

Merged
gustavofreze merged 2 commits into
mainfrom
feature/develop
Feb 17, 2026
Merged

Introduce CountryTimezones class and update timezone handling in Country.#23
gustavofreze merged 2 commits into
mainfrom
feature/develop

Conversation

@gustavofreze
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 17, 2026 08:10
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/CountryTimezones.php
Comment thread src/Country.php
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Timezone and InvalidTimezone classes in favor of external tiny-blocks/time package
  • Renamed Timezones class to CountryTimezones to better reflect its domain-specific purpose
  • Updated method name from findByIdentifier to findByIdentifierOrUtc to 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.

Comment thread README.md Outdated
Comment thread tests/CountryTest.php
Comment thread composer.json
@gustavofreze gustavofreze merged commit e8ebba0 into main Feb 17, 2026
5 checks passed
@gustavofreze gustavofreze deleted the feature/develop branch February 17, 2026 08:21
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.

2 participants