mirror of
https://github.com/beste/clock.git
synced 2026-10-17 19:27:35 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98d1e6f1d8 | ||
|
|
731f4c9651 |
+3
-3
@@ -1,8 +1,8 @@
|
||||
# CHANGELOG
|
||||
|
||||
## [Unreleased]
|
||||
## 2.0.0 - 2022-04-20
|
||||
This release introduces a compatibility layer with the PSR-20 draft, allowing us to already
|
||||
get some interoperability by depending on a shared interface.
|
||||
|
||||
## 1.0.0 - 2021-12-10
|
||||
Initial Release
|
||||
|
||||
[Unreleased]: https://github.com/beste/clock/compare/1.0.0...main
|
||||
|
||||
+6
-3
@@ -11,7 +11,8 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "~7.4.0 || ~8.0.0 || ~8.1.0"
|
||||
"php": "~7.4.0 || ~8.0.0 || ~8.1.0",
|
||||
"stella-maris/clock": "^0.1.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/extension-installer": "^1.1",
|
||||
@@ -27,7 +28,6 @@
|
||||
"Beste\\Clock\\": "src/Clock"
|
||||
},
|
||||
"files": [
|
||||
"src/psr-polyfill.php",
|
||||
"src/Clock.php"
|
||||
]
|
||||
},
|
||||
@@ -40,7 +40,10 @@
|
||||
"psr/clock-implementation": "1.0"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"phpstan/extension-installer": true
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": [
|
||||
|
||||
@@ -7,5 +7,3 @@ parameters:
|
||||
|
||||
tmpDir: .build/phpstan/
|
||||
|
||||
bootstrapFiles:
|
||||
- ./src/psr-polyfill.php
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Beste;
|
||||
|
||||
use Psr\Clock\ClockInterface;
|
||||
use StellaMaris\Clock\ClockInterface;
|
||||
|
||||
interface Clock extends ClockInterface
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Beste\Clock;
|
||||
use Beste\Clock;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
use Psr\Clock\ClockInterface;
|
||||
use StellaMaris\Clock\ClockInterface;
|
||||
|
||||
final class FrozenClock implements Clock
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Beste\Clock;
|
||||
|
||||
use Beste\Clock;
|
||||
use DateTimeImmutable;
|
||||
use Psr\Clock\ClockInterface;
|
||||
use StellaMaris\Clock\ClockInterface;
|
||||
|
||||
final class MinuteClock implements Clock
|
||||
{
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Clock;
|
||||
|
||||
if (class_exists('\Psr\Clock\ClockInterface')) {
|
||||
return;
|
||||
}
|
||||
|
||||
use DateTimeImmutable;
|
||||
|
||||
interface ClockInterface
|
||||
{
|
||||
/**
|
||||
* Returns the current time as a DateTimeImmutable Object
|
||||
*/
|
||||
public function now(): DateTimeImmutable;
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace Beste\Clock\Tests;
|
||||
use Beste\Clock\FrozenClock;
|
||||
use DateTimeImmutable;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psr\Clock\ClockInterface;
|
||||
use StellaMaris\Clock\ClockInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Beste\Clock\Tests;
|
||||
use Beste\Clock\MinuteClock;
|
||||
use DateTimeImmutable;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psr\Clock\ClockInterface;
|
||||
use StellaMaris\Clock\ClockInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
||||
Reference in New Issue
Block a user