do not use static class name as key in proxied classes (changes after compile run to "_Original")

This commit is contained in:
Ferdinand Kuhl 2022-06-01 00:25:02 +02:00
parent 28c6c8ef59
commit 0ae4ab9269

View file

@ -14,6 +14,7 @@ use Symfony\Component\Lock\Exception\LockAcquiringException;
use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\LockFactory;
class SessionLockRequestMiddleware implements MiddlewareInterface
{
public const PARAMETER_NAME = 'sessionLock';
@ -71,7 +72,7 @@ class SessionLockRequestMiddleware implements MiddlewareInterface
$lock = $this->lockFactory->createLockFromKey($key, $this->timeToLive, $this->autoRelease);
$request = $request->withAttribute(static::class . '.' . static::PARAMETER_NAME, $lock);
$request = $request->withAttribute(SessionLockRequestMiddleware::class . '.' . static::PARAMETER_NAME, $lock);
$this->logger->debug('SessionLock: Try to get "' . $key . '"');
$timedOut = \time() + $this->secondsToWait;