Skip to content

Conversation

@nicolas-grekas
Copy link
Member

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #30014
License MIT
Doc PR -

Serializable is really really broken...

public function __sleep()
{
return \serialize([$this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr]);
$this->serialized = [$this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we add the property declaration?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, that's the trick: this is a purely transient state. Declaring a property would mean extra memory used for each instance for zero benefits.

@nicolas-grekas nicolas-grekas merged commit 73070d7 into symfony:3.4 Jan 30, 2019
nicolas-grekas added a commit that referenced this pull request Jan 30, 2019
…rekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] dont implement Serializable in Stub

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30014
| License       | MIT
| Doc PR        | -

`Serializable` is really really broken...

Commits
-------

73070d7 [VarDumper] dont implement Serializable in Stub
This was referenced Feb 3, 2019
@nicolas-grekas nicolas-grekas deleted the vd-sleep branch February 7, 2019 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants