Using cache pool by variable name is deprecated,
Sync GitHub / sync (push) Successful in 7s
PHP Test / test (push) Failing after 54s
Tests / test (push) Failing after 54s
Docker Publish / docker (push) Successful in 58s
Push Develop / docker (push) Successful in 58s

so we've added target attributes.
This commit is contained in:
2026-09-25 12:32:43 -04:00
parent 06e2ca8b19
commit 54990dafc6
6 changed files with 17 additions and 9 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ use App\Trait\HasLoggerTrait;
use App\Trait\StringTrait;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Attribute\Target;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
use Symfony\Component\HttpKernel\Event\RequestEvent;
@@ -21,7 +22,7 @@ final readonly class AcceptListener
use StringTrait;
public function __construct(
private CacheItemPoolInterface $sessionCache,
#[Target('sessionCache')] private CacheItemPoolInterface $sessionCache,
private DomainInterface $domainManager,
private ConfigBag $config,
) {
+2 -1
View File
@@ -9,6 +9,7 @@ use App\Trait\HasLoggerTrait;
use App\Trait\StringTrait;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Attribute\Target;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
use Symfony\Component\HttpKernel\Event\RequestEvent;
@@ -18,7 +19,7 @@ final readonly class AllowListener
use StringTrait;
public function __construct(
private CacheItemPoolInterface $sessionCache,
#[Target('sessionCache')] private CacheItemPoolInterface $sessionCache,
private ConfigBag $config,
) {
}
+3 -2
View File
@@ -7,6 +7,7 @@ namespace App;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
use Symfony\Component\DependencyInjection\Attribute\Target;
/* need autoconfigure so we get it from the service container in Kernel->boot() */
#[Autoconfigure(public: true)]
@@ -17,8 +18,8 @@ final readonly class PersistCache
/** @throws InvalidArgumentException */
public function __construct(
CacheItemPoolInterface $sessionCache,
CacheItemPoolInterface $sessionStorage,
#[Target('sessionCache')] CacheItemPoolInterface $sessionCache,
#[Target('sessionStorage')] CacheItemPoolInterface $sessionStorage,
) {
$this->sessionCache = new MonitorCacheKeys($sessionCache);
$this->sessionStorage = new MonitorCacheKeys($sessionStorage);
+4 -2
View File
@@ -13,6 +13,7 @@ use DateTimeImmutable;
use Exception;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Attribute\Target;
/** backup-codes are case‑insensitive alphanumeric strings
* they are single-use and marked as used after successful authentication */
@@ -29,8 +30,9 @@ final readonly class BackupCodeManager implements BackupCodeInterface
private CacheItemPoolInterface $sessionCache;
/** @throws InvalidArgumentException */
public function __construct(CacheItemPoolInterface $sessionCache)
{
public function __construct(
#[Target('sessionCache')] CacheItemPoolInterface $sessionCache
) {
$this->sessionCache = new MonitorCacheKeys($sessionCache);
}
+2 -1
View File
@@ -13,6 +13,7 @@ use App\Trait\MakeNonceTrait;
use App\Trait\StringTrait;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Attribute\Target;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -30,7 +31,7 @@ final readonly class LoginManager implements LoginInterface
/** @throws InvalidArgumentException */
public function __construct(
CacheItemPoolInterface $sessionCache,
#[Target('sessionCache')] CacheItemPoolInterface $sessionCache,
private BackupCodeInterface $backupCodeManager,
private DomainInterface $domainManager,
) {
+4 -2
View File
@@ -7,6 +7,7 @@ namespace App\Trait;
use Exception;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Attribute\Target;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Contracts\Service\Attribute\Required;
@@ -23,8 +24,9 @@ trait MakeNonceTrait
protected readonly CacheItemPoolInterface $nonceCache;
#[Required]
public function setNonceCache(CacheItemPoolInterface $nonceCache): void
{
public function setNonceCache(
#[Target('nonceCache')] CacheItemPoolInterface $nonceCache,
): void {
$this->nonceCache = $nonceCache;
}