PackageTrack
Sign in Get early access

ghostwriter/clock

Provides a Clock implementation for PHP

3.0.2 3.4M downloads/mo #1644 most downloaded on Packagist ghostwriter/clock

What this package is like to depend on

Last release 2 months ago

27 May 2026

Ships fairly regularly

a new release about every 6 months

Nearly every release is documented

notes for 6 of 6 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

6 releases · first in 2023

1 release in the last 12 months

see the full history below

Release timeline

6 releases · Sep 2023 to May 2026
2024 2025 2026
Release Pre-release

Releases

latest 6
  1. 3.0.2 27 May 2026
    Release notes

    Full Changelog: 3.0.1...3.0.2

    Open source →
  2. 3.0.1 05 Jan 2025
    Release notes

    Full Changelog: 3.0.0...3.0.1

    Open source →
  3. 3.0.0 21 Jun 2024
    Release notes

    What's Changed

    • Class Ghostwriter\Clock\Exception\CannotChangeTimezoneOfFrozenClockException removed
    • Class Ghostwriter\Clock\Interface\ClockExceptionInterface removed
    • Class Ghostwriter\Clock\Trait\ClockTrait removed
    • Method Ghostwriter\Clock\Interface\ClockInterface::withDateTimeZone() removed
    • Method Ghostwriter\Clock\Interface\ClockInterface::withSystemTimezone() removed
    • Method Ghostwriter\Clock\Interface\ClockInterface::withTimezone() removed
    • Method Ghostwriter\Clock\FrozenClock::withDateTimeZone() removed
    • Method Ghostwriter\Clock\FrozenClock::withSystemTimezone() removed
    • Method Ghostwriter\Clock\FrozenClock::withTimezone() removed
    • Method Ghostwriter\Clock\LocalizedClock::withDateTimeZone() removed
    • Method Ghostwriter\Clock\LocalizedClock::withSystemTimezone() removed
    • Method Ghostwriter\Clock\LocalizedClock::withTimezone() removed
    • Method Ghostwriter\Clock\SystemClock::withDateTimeZone() removed
    • Method Ghostwriter\Clock\SystemClock::withSystemTimezone() removed
    • Method Ghostwriter\Clock\SystemClock::withTimezone() removed

    Full Changelog: 2.0.0...3.0.0

    Open source →
    Release notes

    Removed

    • Class Ghostwriter\Clock\Exception\CannotChangeTimezoneOfFrozenClockException removed
    • Class Ghostwriter\Clock\Interface\ClockExceptionInterface removed
    • Class Ghostwriter\Clock\Trait\ClockTrait removed
    • Method Ghostwriter\Clock\Interface\ClockInterface::withDateTimeZone() removed
    • Method Ghostwriter\Clock\Interface\ClockInterface::withSystemTimezone() removed
    • Method Ghostwriter\Clock\Interface\ClockInterface::withTimezone() removed
    • Method Ghostwriter\Clock\FrozenClock::withDateTimeZone() removed
    • Method Ghostwriter\Clock\FrozenClock::withSystemTimezone() removed
    • Method Ghostwriter\Clock\FrozenClock::withTimezone() removed
    • Method Ghostwriter\Clock\LocalizedClock::withDateTimeZone() removed
    • Method Ghostwriter\Clock\LocalizedClock::withSystemTimezone() removed
    • Method Ghostwriter\Clock\LocalizedClock::withTimezone() removed
    • Method Ghostwriter\Clock\SystemClock::withDateTimeZone() removed
    • Method Ghostwriter\Clock\SystemClock::withSystemTimezone() removed
    • Method Ghostwriter\Clock\SystemClock::withTimezone() removed
    Open source →
  4. 2.0.0 16 Dec 2023
    Release notes

    Added

    • Method freeze() was added to interface Ghostwriter\Clock\Interface\ClockInterface
    • Method freeze() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method freeze() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method freeze() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
    • Method new() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method new() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method new() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
    • Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\ClockInterface
    • Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
    • Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\ClockInterface
    • Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
    • Method withTimezone() was added to interface Ghostwriter\Clock\Interface\ClockInterface
    • Method withTimezone() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method withTimezone() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method withTimezone() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface

    Changed

    • Method __construct() of class Ghostwriter\Clock\FrozenClock visibility reduced from public to private
    • Method __construct() of class Ghostwriter\Clock\LocalizedClock visibility reduced from public to private
    • Method freeze() of class Ghostwriter\Clock\Trait\ClockTrait changed from concrete to abstract
    • Method now() of class Ghostwriter\Clock\Trait\ClockTrait changed from concrete to abstract
    • Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • The number of required arguments for Ghostwriter\Clock\FrozenClock#__construct() increased from 0 to 1
    • The number of required arguments for Ghostwriter\Clock\LocalizedClock#__construct() increased from 0 to 1

    Removed

    • Class Ghostwriter\Clock\Exception\UnsupportedClockException has been deleted
    • Method Ghostwriter\Clock\FrozenClock#__construct() was removed
    • Method Ghostwriter\Clock\LocalizedClock#__construct() was removed
    • Method Ghostwriter\Clock\SystemClock::create() was removed

    Full Changelog: 1.1.0...2.0.0

    Open source →
    Release notes

    Added

    • Method freeze() was added to interface Ghostwriter\Clock\Interface\ClockInterface
    • Method freeze() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method freeze() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method freeze() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
    • Method new() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method new() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method new() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
    • Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\ClockInterface
    • Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
    • Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\ClockInterface
    • Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
    • Method withTimezone() was added to interface Ghostwriter\Clock\Interface\ClockInterface
    • Method withTimezone() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
    • Method withTimezone() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
    • Method withTimezone() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface

    Changed

    • Method __construct() of class Ghostwriter\Clock\FrozenClock visibility reduced from public to private
    • Method __construct() of class Ghostwriter\Clock\LocalizedClock visibility reduced from public to private
    • Method freeze() of class Ghostwriter\Clock\Trait\ClockTrait changed from concrete to abstract
    • Method now() of class Ghostwriter\Clock\Trait\ClockTrait changed from concrete to abstract
    • Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
    • The number of required arguments for Ghostwriter\Clock\FrozenClock#__construct() increased from 0 to 1
    • The number of required arguments for Ghostwriter\Clock\LocalizedClock#__construct() increased from 0 to 1

    Removed

    • Class Ghostwriter\Clock\Exception\UnsupportedClockException has been deleted
    • Method Ghostwriter\Clock\FrozenClock#__construct() was removed
    • Method Ghostwriter\Clock\LocalizedClock#__construct() was removed
    • Method Ghostwriter\Clock\SystemClock::create() was removed
    Open source →
  5. 1.1.0 29 Sep 2023
    Release notes

    Full Changelog: 1.0.0...1.1.0

    Open source →
    Release notes
    • Use constructor injection
    Open source →
  6. 1.0.0 29 Sep 2023
    Release notes Open source →
    Release notes
    • First version
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive