do not use static class name as key in proxied classes (changes after compile run to "_Original")
This commit is contained in:
parent
28c6c8ef59
commit
0ae4ab9269
1 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@ use Symfony\Component\Lock\Exception\LockAcquiringException;
|
||||||
use Symfony\Component\Lock\Key;
|
use Symfony\Component\Lock\Key;
|
||||||
use Symfony\Component\Lock\LockFactory;
|
use Symfony\Component\Lock\LockFactory;
|
||||||
|
|
||||||
|
|
||||||
class SessionLockRequestMiddleware implements MiddlewareInterface
|
class SessionLockRequestMiddleware implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
public const PARAMETER_NAME = 'sessionLock';
|
public const PARAMETER_NAME = 'sessionLock';
|
||||||
|
@ -71,7 +72,7 @@ class SessionLockRequestMiddleware implements MiddlewareInterface
|
||||||
|
|
||||||
$lock = $this->lockFactory->createLockFromKey($key, $this->timeToLive, $this->autoRelease);
|
$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 . '"');
|
$this->logger->debug('SessionLock: Try to get "' . $key . '"');
|
||||||
$timedOut = \time() + $this->secondsToWait;
|
$timedOut = \time() + $this->secondsToWait;
|
||||||
|
|
Loading…
Add table
Reference in a new issue