Skip to content

Implemented initial PHP classes for time value objects, including Instant and Timezone.#1

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

Implemented initial PHP classes for time value objects, including Instant and Timezone.#1
gustavofreze merged 2 commits intomainfrom
feature/develop

Conversation

@gustavofreze
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 17, 2026 07:21
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link

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

Adds the initial implementation of immutable time value objects for the TinyBlocks\Time library (notably Instant, Timezone, and a Timezones collection), plus project tooling (tests, static analysis, mutation testing) and CI/security workflows.

Changes:

  • Introduces Instant (UTC-normalized) with string decoding and Unix-seconds constructors, plus formatting/accessors.
  • Adds Timezone and Timezones collection utilities (construction, lookup, conversion).
  • Establishes testing + quality/CI scaffolding (PHPUnit, PHPStan, Infection, GitHub Actions, docs/build files).

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Instant.php Adds the Instant value object (now/fromString/fromUnixSeconds + format/accessors).
src/Timezone.php Adds a Timezone value object validating IANA identifiers.
src/Timezones.php Adds an immutable collection wrapper for Timezone objects.
src/Internal/TextDecoder.php Introduces a decoder pipeline used by Instant::fromString.
src/Internal/Decoders/Decoder.php Defines the decoder interface for parsing text into DateTimeImmutable.
src/Internal/Decoders/OffsetDateTimeDecoder.php Implements offset datetime parsing + UTC normalization.
src/Internal/Exceptions/InvalidInstant.php Adds domain exception for invalid instants.
src/Internal/Exceptions/InvalidTimezone.php Adds domain exception for invalid timezones.
tests/InstantTest.php Adds coverage for Instant behavior (parsing, normalization, formatting, timestamps).
tests/TimezoneTest.php Adds coverage for Timezone validation and conversions.
tests/TimezonesTest.php Adds coverage for the Timezones collection behaviors.
phpunit.xml Adds PHPUnit configuration and coverage reporting.
phpstan.neon.dist Adds PHPStan configuration.
infection.json.dist Adds Infection mutation testing configuration.
composer.json Defines package metadata, dependencies, and scripts.
README.md Adds usage documentation for Instant, Timezone, Timezones.
Makefile Adds local dev/test/review helpers via Docker.
.gitignore Adds ignore rules for vendor/reports/cache/locks.
.gitattributes Excludes non-distribution files from exported archives.
.github/workflows/ci.yml Adds CI pipeline (install, review, tests).
.github/workflows/codeql.yml Adds CodeQL workflow for security checks.
.github/workflows/auto-assign.yml Adds auto-assign workflow for issues/PRs.
.github/dependabot.yml Adds Dependabot configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@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: 3c448218ad

ℹ️ 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".

@gustavofreze gustavofreze merged commit 4ae208c into main Feb 17, 2026
5 checks passed
@gustavofreze gustavofreze deleted the feature/develop branch February 17, 2026 07:28
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.

1 participant