mirror of
https://github.com/beste/clock.git
synced 2026-10-17 19:27:35 +00:00
Remove deprecated Clock interface
This commit is contained in:
+4
-1
@@ -2,9 +2,12 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
Removed the deprecated `Beste\Clock` interface. Clock implementations now implement
|
||||
`Psr\Clock\ClockInterface` directly.
|
||||
|
||||
## 3.1.0 - 2026-08-22
|
||||
|
||||
Deprecates `Beste\Clock` in favor of `Psr\Clock\ClockInterface`. The implementations continue to implement
|
||||
Deprecated `Beste\Clock` in favor of `Psr\Clock\ClockInterface`. The implementations continue to implement
|
||||
the deprecated interface for backwards compatibility. Please type against `Psr\Clock\ClockInterface`.
|
||||
`Beste\Clock` will be removed in 4.0.
|
||||
|
||||
|
||||
+1
-4
@@ -24,10 +24,7 @@
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Beste\\Clock\\": "src/Clock"
|
||||
},
|
||||
"files": [
|
||||
"src/Clock.php"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Beste;
|
||||
|
||||
use Psr\Clock\ClockInterface;
|
||||
|
||||
/**
|
||||
* @deprecated since 3.1.0, use {@see ClockInterface} instead.
|
||||
*/
|
||||
interface Clock extends ClockInterface
|
||||
{
|
||||
|
||||
}
|
||||
@@ -4,12 +4,11 @@ declare(strict_types=1);
|
||||
|
||||
namespace Beste\Clock;
|
||||
|
||||
use Beste\Clock;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
use Psr\Clock\ClockInterface;
|
||||
|
||||
final class FrozenClock implements Clock
|
||||
final class FrozenClock implements ClockInterface
|
||||
{
|
||||
private DateTimeImmutable $frozenAt;
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ declare(strict_types=1);
|
||||
|
||||
namespace Beste\Clock;
|
||||
|
||||
use Beste\Clock;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
use InvalidArgumentException;
|
||||
use Psr\Clock\ClockInterface;
|
||||
use Throwable;
|
||||
|
||||
final class LocalizedClock implements Clock
|
||||
final class LocalizedClock implements ClockInterface
|
||||
{
|
||||
private DateTimeZone $timeZone;
|
||||
|
||||
|
||||
@@ -4,11 +4,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace Beste\Clock;
|
||||
|
||||
use Beste\Clock;
|
||||
use DateTimeImmutable;
|
||||
use Psr\Clock\ClockInterface;
|
||||
|
||||
final class MinuteClock implements Clock
|
||||
final class MinuteClock implements ClockInterface
|
||||
{
|
||||
private ClockInterface $clock;
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace Beste\Clock;
|
||||
|
||||
use Beste\Clock;
|
||||
use DateTimeImmutable;
|
||||
use Psr\Clock\ClockInterface;
|
||||
|
||||
final class SystemClock implements Clock
|
||||
final class SystemClock implements ClockInterface
|
||||
{
|
||||
private function __construct()
|
||||
{
|
||||
|
||||
@@ -4,11 +4,11 @@ declare(strict_types=1);
|
||||
|
||||
namespace Beste\Clock;
|
||||
|
||||
use Beste\Clock;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
use Psr\Clock\ClockInterface;
|
||||
|
||||
final class UTCClock implements Clock
|
||||
final class UTCClock implements ClockInterface
|
||||
{
|
||||
private DateTimeZone $timeZone;
|
||||
|
||||
|
||||
@@ -4,12 +4,11 @@ declare(strict_types=1);
|
||||
|
||||
namespace Beste\Clock;
|
||||
|
||||
use Beste\Clock;
|
||||
use DateTimeImmutable;
|
||||
use InvalidArgumentException;
|
||||
use Psr\Clock\ClockInterface;
|
||||
|
||||
final class WrappingClock implements Clock
|
||||
final class WrappingClock implements ClockInterface
|
||||
{
|
||||
private ClockInterface $wrappedClock;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user