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 73070d7

Browse filesBrowse files
[VarDumper] dont implement Serializable in Stub
1 parent 3cfb558 commit 73070d7
Copy full SHA for 73070d7

File tree

Expand file treeCollapse file tree

1 file changed

+8
-5
lines changed
Filter options
  • src/Symfony/Component/VarDumper/Cloner
Expand file treeCollapse file tree

1 file changed

+8
-5
lines changed

‎src/Symfony/Component/VarDumper/Cloner/Stub.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Cloner/Stub.php
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @author Nicolas Grekas <p@tchwork.com>
1818
*/
19-
class Stub implements \Serializable
19+
class Stub
2020
{
2121
const TYPE_REF = 1;
2222
const TYPE_STRING = 2;
@@ -42,16 +42,19 @@ class Stub implements \Serializable
4242
/**
4343
* @internal
4444
*/
45-
public function serialize()
45+
public function __sleep()
4646
{
47-
return \serialize([$this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr]);
47+
$this->serialized = [$this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr];
48+
49+
return ['serialized'];
4850
}
4951

5052
/**
5153
* @internal
5254
*/
53-
public function unserialize($serialized)
55+
public function __wakeup()
5456
{
55-
list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = \unserialize($serialized);
57+
list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = $this->serialized;
58+
unset($this->serialized);
5659
}
5760
}

0 commit comments

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