Skip to content

Commit e149f09

Browse files
Merge branch '4.4' into 5.2
* 4.4: 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 35ce7ae + e992e77 commit e149f09

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
@@ -235,12 +235,22 @@ public function getSalt()
235235

236236
public function serialize(): string
237237
{
238-
return serialize($this->name);
238+
return serialize($this->__serialize());
239239
}
240240

241241
public function unserialize($serialized): void
242242
{
243-
$this->name = unserialize($serialized);
243+
$this->__unserialize(unserialize($serialized));
244+
}
245+
246+
public function __serialize(): array
247+
{
248+
return ['name' => $this->name];
249+
}
250+
251+
public function __unserialize(array $data): void
252+
{
253+
['name' => $this->name] = $data;
244254
}
245255
}
246256

0 commit comments

Comments
 (0)