Skip to content

Commit

Permalink
Merge pull request #531 from ergebnis/feature/clock
Browse files Browse the repository at this point in the history
Enhancement: Require `psr/clock` and provide `psr/clock-implementation`
  • Loading branch information
localheinz authored Nov 25, 2022
2 parents cdbc241 + 50ea431 commit 3fbf07e
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 6 deletions.
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

For a full diff see [`2.4.0...main`][2.4.0...main].
For a full diff see [`2.5.0...main`][2.5.0...main].

## [`2.5.0`][2.5.0]

For a full diff see [`2.3.0...2.4.0`][2.3.0...2.4.0].

### Changed

* Adjusted `Clock` interface to extend [`Psr\Clock\ClockInterface`](https://github.com/php-fig/clock/blob/1.0.0/src/ClockInterface.php) ([#531]), by [@localheinz]

## [`2.4.0`][2.4.0]

Expand Down Expand Up @@ -108,6 +116,7 @@ For a full diff see [`36912f6...1.0.0`][36912f6...1.0.0].
[2.2.0]: https://github.com/ergebnis/clock/releases/tag/2.2.0
[2.3.0]: https://github.com/ergebnis/clock/releases/tag/2.3.0
[2.4.0]: https://github.com/ergebnis/clock/releases/tag/2.4.0
[2.5.0]: https://github.com/ergebnis/clock/releases/tag/2.5.0

[36912f6...1.0.0]: https://github.com/ergebnis/clock/compare/36912f6...1.0.0
[1.0.0...2.0.0]: https://github.com/ergebnis/clock/compare/1.0.0...2.0.0
Expand All @@ -116,7 +125,8 @@ For a full diff see [`36912f6...1.0.0`][36912f6...1.0.0].
[2.1.0...2.2.0]: https://github.com/ergebnis/clock/compare/2.1.0...2.2.0
[2.2.0...2.3.0]: https://github.com/ergebnis/clock/compare/2.2.0...2.3.0
[2.3.0...2.4.0]: https://github.com/ergebnis/clock/compare/2.3.0...2.4.0
[2.4.0...main]: https://github.com/ergebnis/clock/compare/2.4.0...main
[2.4.0...2.5.0]: https://github.com/ergebnis/clock/compare/2.4.0...2.5.0
[2.5.0...main]: https://github.com/ergebnis/clock/compare/2.5.0...main

[#1]: https://github.com/ergebnis/clock/pull/1
[#2]: https://github.com/ergebnis/clock/pull/2
Expand All @@ -128,6 +138,7 @@ For a full diff see [`36912f6...1.0.0`][36912f6...1.0.0].
[#252]: https://github.com/ergebnis/clock/pull/252
[#387]: https://github.com/ergebnis/clock/pull/387
[#400]: https://github.com/ergebnis/clock/pull/400
[#531]: https://github.com/ergebnis/clock/pull/531

[@ergebnis]: https://github.com/ergebnis
[@localheinz]: https://github.com/localheinz
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"source": "https://github.com/ergebnis/clock"
},
"require": {
"php": "^7.4 || ^8.0"
"php": "^7.4 || ^8.0",
"psr/clock": "^1.0.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.28.3",
Expand All @@ -31,6 +32,9 @@
"psalm/plugin-phpunit": "~0.18.3",
"vimeo/psalm": "^4.30.0"
},
"provide": {
"psr/clock-implementation": "1.0.0"
},
"autoload": {
"psr-4": {
"Ergebnis\\Clock\\": "src/"
Expand Down
53 changes: 51 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/Clock.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

namespace Ergebnis\Clock;

interface Clock
use Psr\Clock\ClockInterface;

interface Clock extends ClockInterface
{
public function now(): \DateTimeImmutable;
}

0 comments on commit 3fbf07e

Please sign in to comment.