Repository navigation
Chronos 3.0.0
Chronos 3 introduces some large changes driven by changes in PHP 8 (and expected change in PHP 9).
The biggest change is Chronos and ChronosDate no longer extend DateTimeImmutable which means they no longer implement DateTimeInterface. This will affect projects that use either of these as type declarations and pass in Chronos objects.
All of the relevant methods from DateTimeImmutable are still available on Chronos and ChronosDate. Some methods that were only relevant for Chronos were dropped from ChronosDate and so on.
If you need to pass a DateTimeImmutable or DateTimeInterface objects to a library, you can use the toNative() helper to get the equivalent DateTimeImmutable object.
Major Changes
ChronosandChronosDateno longer extendDateTimeImmutableand no longer implementDateTimeInterfaceChronosInterfacewas dropped asChronosandChronosDateno longer extend the same base and don't try to share incompatible methods.MutableDateTimeandMutableDatawere droppedChronosTimewas added which supports parsing strings and conversion fromChronosandDateTimeInterface