update patch 1
This commit is contained in:
+5
-7
@@ -21,8 +21,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
|
||||
*/
|
||||
class MemcachedSessionHandler extends AbstractSessionHandler
|
||||
{
|
||||
private \Memcached $memcached;
|
||||
|
||||
/**
|
||||
* Time to live in seconds.
|
||||
*/
|
||||
@@ -42,12 +40,12 @@ class MemcachedSessionHandler extends AbstractSessionHandler
|
||||
*
|
||||
* @throws \InvalidArgumentException When unsupported options are passed
|
||||
*/
|
||||
public function __construct(\Memcached $memcached, array $options = [])
|
||||
{
|
||||
$this->memcached = $memcached;
|
||||
|
||||
public function __construct(
|
||||
private \Memcached $memcached,
|
||||
array $options = [],
|
||||
) {
|
||||
if ($diff = array_diff(array_keys($options), ['prefix', 'expiretime', 'ttl'])) {
|
||||
throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff)));
|
||||
throw new \InvalidArgumentException(\sprintf('The following options are not supported "%s".', implode(', ', $diff)));
|
||||
}
|
||||
|
||||
$this->ttl = $options['expiretime'] ?? $options['ttl'] ?? null;
|
||||
|
||||
Reference in New Issue
Block a user