Skip to content

Commit

Permalink
Implement forward compatible Clock-Interface
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jeromegamez committed Apr 24, 2022
1 parent a672fa7 commit 32b54d9
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## Unreleased

Implemented forward compatible Clock-Interface

The [stella-maris/clock](https://packagist.org/packages/stella-maris/clock) package provides an interface based on the
currently proposed status of [PSR-20](https://github.com/php-fig/fig-standards/blob/6666a48cabf651bb0c06e090e028fe100100a45c/proposed/clock.md).
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 PSR-20 interface so that this package becomes immeadiately PSR20 compatible
without any further work necessary.

## 2.3.0 - 2022-04-16

* Removed `firebase/php-jwt` dev dependency and simplified test token generation.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ext-openssl": "*",
"fig/http-message-util": "^1.1.5",
"guzzlehttp/guzzle": "^7.0",
"beste/clock": "^1.0",
"beste/clock": "^2.0",
"lcobucci/jwt": "^4.1.5",
"psr/cache": "^1.0|^2.0|^3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/JWT/Action/CreateCustomToken/WithLcobucciJWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Lcobucci\JWT\Configuration;
use Lcobucci\JWT\Signer\Key\InMemory;
use Lcobucci\JWT\Signer\Rsa\Sha256;
use Psr\Clock\ClockInterface;
use StellaMaris\Clock\ClockInterface;
use Throwable;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/JWT/Action/FetchGooglePublicKeys/WithGuzzle.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Kreait\Firebase\JWT\Contract\Keys;
use Kreait\Firebase\JWT\Error\FetchingGooglePublicKeysFailed;
use Kreait\Firebase\JWT\Keys\ExpiringKeys;
use Psr\Clock\ClockInterface;
use StellaMaris\Clock\ClockInterface;

/**
* @internal
Expand Down
2 changes: 1 addition & 1 deletion src/JWT/Action/FetchGooglePublicKeys/WithPsr6Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Kreait\Firebase\JWT\Contract\Keys;
use Kreait\Firebase\JWT\Error\FetchingGooglePublicKeysFailed;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Clock\ClockInterface;
use StellaMaris\Clock\ClockInterface;

/**
* @internal
Expand Down
2 changes: 1 addition & 1 deletion src/JWT/Action/VerifyIdToken/WithLcobucciJWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Lcobucci\JWT\Validation\ConstraintViolation;
use Lcobucci\JWT\Validation\RequiredConstraintsViolated;
use Lcobucci\JWT\Validation\Validator;
use Psr\Clock\ClockInterface;
use StellaMaris\Clock\ClockInterface;
use Throwable;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/JWT/Action/VerifySessionCookie/WithLcobucciJWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Lcobucci\JWT\Validation\ConstraintViolation;
use Lcobucci\JWT\Validation\RequiredConstraintsViolated;
use Lcobucci\JWT\Validation\Validator;
use Psr\Clock\ClockInterface;
use StellaMaris\Clock\ClockInterface;
use Throwable;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/JWT/GooglePublicKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Kreait\Firebase\JWT\Action\FetchGooglePublicKeys\WithGuzzle;
use Kreait\Firebase\JWT\Contract\Expirable;
use Kreait\Firebase\JWT\Contract\Keys;
use Psr\Clock\ClockInterface;
use StellaMaris\Clock\ClockInterface;

final class GooglePublicKeys implements Keys
{
Expand Down
2 changes: 1 addition & 1 deletion tests/JWT/Util/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Lcobucci\JWT\Signer\None;
use Lcobucci\JWT\Signer\Rsa\Sha256;
use Lcobucci\JWT\Token\Builder;
use Psr\Clock\ClockInterface;
use StellaMaris\Clock\ClockInterface;

final class Token
{
Expand Down

0 comments on commit 32b54d9

Please sign in to comment.