You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cache used in the FirebaseJwtAdapter is not compatible with symfony/cache because it uses a Carbon date for the cache item TTL but Symfony only accepts an integer or a DateInterval.
publicfunctionexpiresAfter($time): self
{
if (null === $time) {
$this->expiry = null;
} elseif ($timeinstanceof \DateInterval) {
$this->expiry = microtime(true) + \DateTime::createFromFormat('U', 0)->add($time)->format('U.u');
} elseif (\is_int($time)) {
$this->expiry = $time + microtime(true);
} else {
thrownewInvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', get_debug_type($time)));
}
return$this;
}
So we get the following exception when setting the TTL:
{class: "Symfony\\Component\\Cache\\Exception\\InvalidArgumentException"detail: "Expiration date must be an integer, a DateInterval or null, \"Carbon\\Carbon\" given."}
The cache used in the FirebaseJwtAdapter is not compatible with symfony/cache because it uses a Carbon date for the cache item TTL but Symfony only accepts an integer or a DateInterval.
https://github.com/symfony/cache/blob/364fc90734230d936ac2db8e897cc03ec8497bbb/CacheItem.php#L90
So we get the following exception when setting the TTL:
Pull Request : #106