8000 Merge branch '5.4' into 6.0 · symfony/symfony@00c9e1d · GitHub
[go: up one dir, main page]

Skip to content

Commit 00c9e1d

Browse files
committed
Merge branch '5.4' into 6.0
2 parents 5f4d04f + 49a076a commit 00c9e1d

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

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

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

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

Lines 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

Lines 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'

src/Symfony/Component/VarExporter/Tests/VarExporterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public function __construct(array $array)
307307
parent::__construct($array, 1);
308308
}
309309

310-
public function setFlags($flags)
310+
public function setFlags($flags): void
311311
{
312312
throw new \BadMethodCallException('Calling MyArrayObject::setFlags() is forbidden');
313313
}
@@ -340,7 +340,7 @@ public function serialize(): string
340340
return serialize([123, parent::serialize()]);
341341
}
342342

343-
public function unserialize($data)
343+
public function unserialize($data): void
344344
{
345345
if ('' === $data) {
346346
throw new \InvalidArgumentException('Serialized data is empty.');

0 commit comments

Comments
 (0)
0