diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MarshallingSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MarshallingSessionHandler.php index e1cad6a9454e5..c321c8c932377 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MarshallingSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MarshallingSessionHandler.php @@ -30,6 +30,7 @@ public function __construct(AbstractSessionHandler $handler, MarshallerInterface /** * @return bool */ + #[\ReturnTypeWillChange] public function open($savePath, $name) { return $this->handler->open($savePath, $name); @@ -38,6 +39,7 @@ public function open($savePath, $name) /** * @return bool */ + #[\ReturnTypeWillChange] public function close() { return $this->handler->close(); @@ -46,14 +48,16 @@ public function close() /** * @return bool */ + #[\ReturnTypeWillChange] public function destroy($sessionId) { return $this->handler->destroy($sessionId); } /** - * @return bool + * @return int|false */ + #[\ReturnTypeWillChange] public function gc($maxlifetime) { return $this->handler->gc($maxlifetime); @@ -62,6 +66,7 @@ public function gc($maxlifetime) /** * @return string */ + #[\ReturnTypeWillChange] public function read($sessionId) { return $this->marshaller->unmarshall($this->handler->read($sessionId)); @@ -70,6 +75,7 @@ public function read($sessionId) /** * @return bool */ + #[\ReturnTypeWillChange] public function write($sessionId, $data) { $failed = []; @@ -85,6 +91,7 @@ public function write($sessionId, $data) /** * @return bool */ + #[\ReturnTypeWillChange] public function validateId($sessionId) { return $this->handler->validateId($sessionId); @@ -93,6 +100,7 @@ public function validateId($sessionId) /** * @return bool */ + #[\ReturnTypeWillChange] public function updateTimestamp($sessionId, $data) { return $this->handler->updateTimestamp($sessionId, $data); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MarshallingSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MarshallingSessionHandlerTest.php index db8c7432707c0..7216cdd1ece74 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MarshallingSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MarshallingSessionHandlerTest.php @@ -72,7 +72,7 @@ public function testGc() $marshallingSessionHandler = new MarshallingSessionHandler($this->handler, $this->marshaller); $this->handler->expects($this->once())->method('gc') - ->with(4711)->willReturn(true); + ->with(4711)->willReturn(1); $marshallingSessionHandler->gc(4711); } diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php index f0a1fbbe8b045..c39e82cf6adb0 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php @@ -164,7 +164,7 @@ public function testAnonymousClass() , $c ); - $c = eval('return new class implements \Countable { private $foo = "foo"; public function count() { return 0; } };'); + $c = eval('return new class implements \Countable { private $foo = "foo"; public function count(): int { return 0; } };'); $this->assertDumpMatchesFormat( <<<'EOTXT'