Skip to content

Commit

Permalink
Merge branch '3.4' into 4.2
Browse files Browse the repository at this point in the history
* 3.4:
  Prevent destructors with side-effects from being unserialized
  • Loading branch information
nicolas-grekas committed Apr 16, 2019
2 parents 517e41b + c31a91b commit 51d96f5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Tests/Kernel/ConcreteMicroKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ public function getLogDir()
return $this->cacheDir;
}

public function __sleep()
{
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
}

public function __wakeup()
{
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
}

public function __destruct()
{
$fs = new Filesystem();
Expand Down

0 comments on commit 51d96f5

Please sign in to comment.