diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php index 42c3df54a2..3ae8b9ea44 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php @@ -31,6 +31,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess /** * @return bool */ + #[\ReturnTypeWillChange] public function open($savePath, $sessionName) { $this->sessionName = $sessionName; @@ -66,6 +67,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess /** * @return bool */ + #[\ReturnTypeWillChange] public function validateId($sessionId) { $this->prefetchData = $this->read($sessionId); @@ -86,6 +88,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess /** * @return string */ + #[\ReturnTypeWillChange] public function read($sessionId) { if (null !== $this->prefetchId) { @@ -109,6 +112,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess /** * @return bool */ + #[\ReturnTypeWillChange] public function write($sessionId, $data) { if (null === $this->igbinaryEmptyData) { @@ -126,6 +130,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess /** * @return bool */ + #[\ReturnTypeWillChange] public function destroy($sessionId) { if (!headers_sent() && filter_var(ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php index 3144ea597e..627bcfa1df 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php @@ -33,6 +33,7 @@ class StrictSessionHandler extends AbstractSessionHandler /** * @return bool */ + #[\ReturnTypeWillChange] public function open($savePath, $sessionName) { parent::open($savePath, $sessionName); @@ -51,6 +52,7 @@ class StrictSessionHandler extends AbstractSessionHandler /** * @return bool */ + #[\ReturnTypeWillChange] public function updateTimestamp($sessionId, $data) { return $this->write($sessionId, $data); @@ -67,6 +69,7 @@ class StrictSessionHandler extends AbstractSessionHandler /** * @return bool */ + #[\ReturnTypeWillChange] public function destroy($sessionId) { $this->doDestroy = true; @@ -88,14 +91,16 @@ class StrictSessionHandler extends AbstractSessionHandler /** * @return bool */ + #[\ReturnTypeWillChange] public function close() { return $this->handler->close(); } /** - * @return bool + * @return int|false */ + #[\ReturnTypeWillChange] public function gc($maxlifetime) { return $this->handler->gc($maxlifetime); diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php index de4f550bad..5535bc9644 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php @@ -38,6 +38,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf /** * @return bool */ + #[\ReturnTypeWillChange] public function open($savePath, $sessionName) { return (bool) $this->handler->open($savePath, $sessionName); @@ -46,6 +47,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf /** * @return bool */ + #[\ReturnTypeWillChange] public function close() { return (bool) $this->handler->close(); @@ -54,6 +56,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf /** * @return string */ + #[\ReturnTypeWillChange] public function read($sessionId) { return (string) $this->handler->read($sessionId); @@ -62,6 +65,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf /** * @return bool */ + #[\ReturnTypeWillChange] public function write($sessionId, $data) { return (bool) $this->handler->write($sessionId, $data); @@ -70,22 +74,25 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf /** * @return bool */ + #[\ReturnTypeWillChange] public function destroy($sessionId) { return (bool) $this->handler->destroy($sessionId); } /** - * @return bool + * @return int|false */ + #[\ReturnTypeWillChange] public function gc($maxlifetime) { - return (bool) $this->handler->gc($maxlifetime); + return $this->handler->gc($maxlifetime); } /** * @return bool */ + #[\ReturnTypeWillChange] public function validateId($sessionId) { return !$this->handler instanceof \SessionUpdateTimestampHandlerInterface || $this->handler->validateId($sessionId); @@ -94,6 +101,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf /** * @return bool */ + #[\ReturnTypeWillChange] public function updateTimestamp($sessionId, $data) { return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data);