Skip to content

Commit 94aed41

Browse files
Merge branch '5.2' into 5.x
* 5.2: 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 transient test with HttpClient jitter Fix missing BCC recipients in SES bridge Move AuthenticationSuccessEvent outside try/catch block Dont allow unserializing classes with a destructor - 5.2 Dont allow unserializing classes with a destructor - 5.1
2 parents 728df4f + 6b448da commit 94aed41

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Lock.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ public function __construct(Key $key, PersistingStoreInterface $store, float $tt
4949
$this->logger = new NullLogger();
5050
}
5151

52+
public function __sleep()
53+
{
54+
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
55+
}
56+
57+
public function __wakeup()
58+
{
59+
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
60+
}
61+
5262
/**
5363
* Automatically releases the underlying lock when the object is destructed.
5464
*/

0 commit comments

Comments
 (0)