Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ab3c43f

Browse filesBrowse files
committed
Fix return types for PHP 8.1
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent bc1b5be commit ab3c43f
Copy full SHA for ab3c43f

File tree

3 files changed

+11
-3
lines changed
Filter options

3 files changed

+11
-3
lines changed

‎src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MarshallingSessionHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MarshallingSessionHandler.php
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public function __construct(AbstractSessionHandler $handler, MarshallerInterface
3030
/**
3131
* @return bool
3232
*/
33+
#[\ReturnTypeWillChange]
3334
public function open($savePath, $name)
3435
{
3536
return $this->handler->open($savePath, $name);
@@ -38,6 +39,7 @@ public function open($savePath, $name)
3839
/**
3940
* @return bool
4041
*/
42+
#[\ReturnTypeWillChange]
4143
public function close()
4244
{
4345
return $this->handler->close();
@@ -46,14 +48,16 @@ public function close()
4648
/**
4749
* @return bool
4850
*/
51+
#[\ReturnTypeWillChange]
4952
public function destroy($sessionId)
5053
{
5154
return $this->handler->destroy($sessionId);
5255
}
5356

5457
/**
55-
* @return bool
58+
* @return int|false
5659
*/
60+
#[\ReturnTypeWillChange]
5761
public function gc($maxlifetime)
5862
{
5963
return $this->handler->gc($maxlifetime);
@@ -62,6 +66,7 @@ public function gc($maxlifetime)
6266
/**
6367
* @return string
6468
*/
69+
#[\ReturnTypeWillChange]
6570
public function read($sessionId)
6671
{
6772
return $this->marshaller->unmarshall($this->handler->read($sessionId));
@@ -70,6 +75,7 @@ public function read($sessionId)
7075
/**
7176
* @return bool
7277
*/
78+
#[\ReturnTypeWillChange]
7379
public function write($sessionId, $data)
7480
{
7581
$failed = [];
@@ -85,6 +91,7 @@ public function write($sessionId, $data)
8591
/**
8692
* @return bool
8793
*/
94+
#[\ReturnTypeWillChange]
8895
public function validateId($sessionId)
8996
{
9097
return $this->handler->validateId($sessionId);
@@ -93,6 +100,7 @@ public function validateId($sessionId)
93100
/**
94101
* @return bool
95102
*/
103+
#[\ReturnTypeWillChange]
96104
public function updateTimestamp($sessionId, $data)
97105
{
98106
return $this->handler->updateTimestamp($sessionId, $data);

‎src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MarshallingSessionHandlerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MarshallingSessionHandlerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testGc()
7272
$marshallingSessionHandler = new MarshallingSessionHandler($this->handler, $this->marshaller);
7373

7474
$this->handler->expects($this->once())->method('gc')
75-
->with(4711)->willReturn(true);
75+
->with(4711)->willReturn(1);
7676

7777
$marshallingSessionHandler->gc(4711);
7878
}

‎src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function testAnonymousClass()
164164
, $c
165165
);
166166

167-
$c = eval('return new class implements \Countable { private $foo = "foo"; public function count() { return 0; } };');
167+
$c = eval('return new class implements \Countable { private $foo = "foo"; public function count(): int { return 0; } };');
168168

169169
$this->assertDumpMatchesFormat(
170170
<<<'EOTXT'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.