From 89e6eeda81caebe9b63b894a70477a7321295d3a Mon Sep 17 00:00:00 2001 From: luxemate Date: Mon, 21 Feb 2022 15:35:47 +0200 Subject: [PATCH] Fix missing ReturnTypeWillChange attributes --- .../Session/Storage/Handler/MongoDbSessionHandler.php | 2 ++ .../Session/Storage/Handler/RedisSessionHandler.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index 51b8023e9fb10..2c3cb53c1e6dd 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -82,6 +82,7 @@ public function __construct(\MongoDB\Client $mongo, array $options) /** * @return bool */ + #[\ReturnTypeWillChange] public function close() { return true; @@ -135,6 +136,7 @@ protected function doWrite($sessionId, $data) /** * @return bool */ + #[\ReturnTypeWillChange] public function updateTimestamp($sessionId, $data) { $expiry = new \MongoDB\BSON\UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php index a9c4e392e94c7..51bec203dfa17 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php @@ -97,6 +97,7 @@ protected function doDestroy($sessionId): bool /** * {@inheritdoc} */ + #[\ReturnTypeWillChange] public function close(): bool { return true; @@ -116,6 +117,7 @@ public function gc($maxlifetime) /** * @return bool */ + #[\ReturnTypeWillChange] public function updateTimestamp($sessionId, $data) { return (bool) $this->redis->expire($this->prefix.$sessionId, (int) ($this->ttl ?? ini_get('session.gc_maxlifetime')));