Skip to content

Commit fd4a606

Browse files
Merge branch '5.2' into 5.3
* 5.2: fix tests (ter) Fix tests (bis) [travis] fix travis hopefuly [Security] Fix SerializableUser fixture [FrameworkBundle][WebProfilerBundle] Don't pass null to string parameters
2 parents fabb3c6 + e149f09 commit fd4a606

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Tests/Authentication/Token/AbstractTokenTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,22 @@ public function getSalt()
278278

279279
public function serialize(): string
280280
{
281-
return serialize($this->name);
281+
return serialize($this->__serialize());
282282
}
283283

284284
public function unserialize($serialized): void
285285
{
286-
$this->name = unserialize($serialized);
286+
$this->__unserialize(unserialize($serialized));
287+
}
288+
289+
public function __serialize(): array
290+
{
291+
return ['name' => $this->name];
292+
}
293+
294+
public function __unserialize(array $data): void
295+
{
296+
['name' => $this->name] = $data;
287297
}
288298
}
289299

0 commit comments

Comments
 (0)