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 8fbf3bb

Browse filesBrowse files
committed
[Security] Fix SerializableUser fixture
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent b87de42 commit 8fbf3bb
Copy full SHA for 8fbf3bb

File tree

Expand file treeCollapse file tree

1 file changed

+12
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-2
lines changed

‎src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php
+12-2Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,22 @@ public function getSalt()
322322

323323
public function serialize(): string
324324
{
325-
return serialize($this->name);
325+
return serialize($this->__serialize());
326326
}
327327

328328
public function unserialize($serialized): void
329329
{
330-
$this->name = unserialize($serialized);
330+
$this->__unserialize(unserialize($serialized));
331+
}
332+
333+
public function __serialize(): array
334+
{
335+
return ['name' => $this->name];
336+
}
337+
338+
public function __unserialize(array $data): void
339+
{
340+
['name' => $this->name] = $data;
331341
}
332342
}
333343

0 commit comments

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