Skip to content

Commit 43c803b

Browse files
Merge branch '4.4' into 5.1
* 4.4: Dont allow unserializing classes with a destructor Dont allow unserializing classes with a destructor - 4.4 [Cache] fix possible collision when writing tmp file in filesystem adapter a colon followed by spaces exclusively separates mapping keys and values Contracts: Remove ellipsis fix handling float-like key attribute values Fix missing BCC recipients in SES bridge
2 parents 8bd2aa1 + 7510395 commit 43c803b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Loader/Configurator/CollectionConfigurator.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ public function __construct(RouteCollection $parent, string $name, self $parentC
3838
$this->parentPrefixes = $parentPrefixes;
3939
}
4040

41+
public function __sleep()
42+
{
43+
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
44+
}
45+
46+
public function __wakeup()
47+
{
48+
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
49+
}
50+
4151
public function __destruct()
4252
{
4353
if (null === $this->prefixes) {

Loader/Configurator/ImportConfigurator.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ public function __construct(RouteCollection $parent, RouteCollection $route)
3030
$this->route = $route;
3131
}
3232

33+
public function __sleep()
34+
{
35+
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
36+
}
37+
38+
public function __wakeup()
39+
{
40+
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
41+
}
42+
3343
public function __destruct()
3444
{
3545
$this->parent->addCollection($this->route);

0 commit comments

Comments
 (0)