Skip to content

Releases: cakephp/chronos

Chronos 2.4.0

06 Aug 22:55
Compare
Choose a tag to compare

Major Changes

What's Changed

Full Changelog: 2.3.3...2.4.0

Chronos 3.0.0

06 Aug 22:53
414dbfb
Compare
Choose a tag to compare

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

  • Chronos and ChronosDate no longer extend DateTimeImmutable and no longer implement DateTimeInterface
  • ChronosInterface was dropped as Chronos and ChronosDate no longer extend the same base and don't try to share incompatible methods.
  • MutableDateTime and MutableData were dropped
  • ChronosTime was added which supports parsing strings and conversion from Chronos and DateTimeInterface

Chronos 3.0.0-beta3

26 Apr 08:35
d26e6bb
Compare
Choose a tag to compare
Chronos 3.0.0-beta3 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 3.0.0-beta2...3.0.0-beta3

Chronos 2.3.3

19 Apr 15:06
b5d962b
Compare
Choose a tag to compare

What's Changed

  • Update docs for Date + timezone by @markstory in #388
  • Return the false returned by parent::getLastErrors() as default errors array by @zonuexe in #391

New Contributors

Full Changelog: 2.3.2...2.3.3

Chronos 3.0.0-beta2

08 Apr 04:26
5e0875d
Compare
Choose a tag to compare
Chronos 3.0.0-beta2 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 3.0.0-beta1...3.0.0-beta2

Chronos 2.4.0-RC2

23 Jan 15:02
1ee6e6f
Compare
Choose a tag to compare
Chronos 2.4.0-RC2 Pre-release
Pre-release

Chronos 2.4.0 will be backwards compatible with the rest of Chronos 2.x. However, 2.4.0 will introduce deprecations to the mutable classes and many methods in preparation for the changes coming in Chronos 3. The upgrade guide has more information on the upcoming changes and how to update your application.

Chronos 3.0.0-beta1

19 Dec 17:29
33c64be
Compare
Choose a tag to compare
Chronos 3.0.0-beta1 Pre-release
Pre-release

Chronos 3.0 will be a major release that contains breaking changes. This beta release provides a preview release of what will be coming in the future and unblocks CakePHP 5.0 beta releases.

Summary of Breaking changes

  • Removed Mutable datetime and date classes.
  • ChronosDate no longer implements DateTimeInterface and doesn't share types with Chronos either. This resolves a long standing interface compatibility issue where Date and DateTime objects appeared to be more type compatible than they should be.
  • Chronos no longer implements DateTimeInterface or extends DateTimeImmutable. Instead Chronos is a wrapper around PHP's datetime, and continues to offer a similar interface to the PHP objects.
  • Removed Carbon compatibility shims. While chronos started out as a fork of Carbon due to lack of maintainship, the Carbon project has new maintainers and we no longer need to encroach on that namespace.

Upgrading

In the future 2.4 will be released with deprecations to help with upgrading to chronos 3.x

Chronos 2.4.0-RC1

17 Jan 05:01
1d28b2b
Compare
Choose a tag to compare
Chronos 2.4.0-RC1 Pre-release
Pre-release

Chronos 2.4.0 will be backwards compatible with the rest of Chronos 2.x. However, 2.4.0 will introduce deprecations to the mutable classes and many methods in preparation for the changes coming in Chronos 3. The upgrade guide has more information on the upcoming changes and how to update your application.

Chronos 2.3.2

08 Nov 05:35
a21b7b6
Compare
Choose a tag to compare

What's Changed

  • Fix: Unexpected Human Interval Values by @MGatner in #323
  • Switch human diff to months when interval is 2+ months by @othercorey in #343

Full Changelog: 2.3.1...2.3.2

Chronos 2.3.1

21 Oct 08:24
1075511
Compare
Choose a tag to compare

What's Changed

  • Fix passing negative value to sub helpers such as subYears(-1) for PHP 8.2