12 Commits
Author SHA1 Message Date
Jérôme Gamez c2243a5934 Harden WrappingClock validation
Wrapping an object should not call it just to validate the return value.
Instead, we check the method signature when the object is wrapped, and
the return value at runtime. We were implicitly checking it already
with the `assert()` calls.
2026-08-23 20:03:38 +02:00
Jérôme Gamez 7db7032723 Type time zone input 2026-08-23 19:33:15 +02:00
Jérôme Gamez b4408036c1 Move source and test files up one level 2026-08-22 23:24:55 +02:00
Jérôme Gamez 0a55b7a019 Remove deprecated Clock interface 2026-08-22 23:24:55 +02:00
Jérôme Gamez 622d86328b Deprecate Clock interface 2026-08-22 00:11:17 +02:00
Jérôme Gamez 48c449b37e Import classes instead of using FQNs 2025-09-29 23:57:09 +02:00
Jérôme Gamez ebd491dc6e Replace stella-maris/clock with psr/clock 2022-11-26 19:01:32 +01:00
Jérôme Gamez 6ee3f318f8 Switch back to stella-maris/clock
This reverts commit a5e62affe0.
2022-11-25 19:22:56 +01:00
Jérôme Gamez a5e62affe0 Switch to the now released psr/clock-interface 2022-11-25 18:08:55 +01:00
Jérôme Gamez f3edef9cbc Add a WrappingClock
The `WrappingClock` allows using an object with a `now()` method
returning a `DateTimeImmutable` object as a "real" clock.
2022-04-24 15:38:25 +02:00
Andreas Heigl 731f4c9651 Implement forward compatible Clock-Interface
The stella-maris/clock package provides an interface based on the
currently proposed status of PSR20. Due to the inactivity of the PSR20 working
group this is a way to already provide interoperability while still
maintaining forward compatibility. When the current status of PSR20 will
be released at one point in time the stella-maris/clock package will
extend the PSR20 interface so that this package becomes immeadiately
PSR20 compatible without any further work necessary. In the long run the
stella-maris/clock package will then be marked deprecated so that people
can then use the PSR20 provided implementation.

Should the implementation of PSR20 change between now and a possible
release then this interface will still exist and a possible
implementation will need more code-changes anyhow so this interface will
still provide some way of interoperability.

The implementation of the PSR20 polyfill has been moved to the
stella-maris/clock interface which can be implemented independentyl from
PSR20 and might allow some interoperability before the working group of
the FIG manages to decide upon something.
2022-04-20 16:21:40 +02:00
Jérôme Gamez 10c02d2b49 Initial Release 2021-12-10 16:09:27 +01:00