File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -90,12 +90,16 @@ public function isExpired(): bool
9090 return null !== $ this ->expiringTime && $ this ->expiringTime <= microtime (true );
9191 }
9292
93- public function __sleep (): array
93+ public function __serialize (): array
9494 {
9595 if (!$ this ->serializable ) {
9696 throw new UnserializableKeyException ('The key cannot be serialized. ' );
9797 }
9898
99- return ['resource ' , 'expiringTime ' , 'state ' ];
99+ return [
100+ 'resource ' => $ this ->resource ,
101+ 'expiringTime ' => $ this ->expiringTime ,
102+ 'state ' => $ this ->state ,
103+ ];
100104 }
101105}
Original file line number Diff line number Diff line change @@ -42,12 +42,12 @@ public function __construct(
4242 ) {
4343 }
4444
45- public function __sleep (): array
45+ public function __serialize (): array
4646 {
4747 throw new \BadMethodCallException ('Cannot serialize ' .__CLASS__ );
4848 }
4949
50- public function __wakeup ( ): void
50+ public function __unserialize ( array $ data ): void
5151 {
5252 throw new \BadMethodCallException ('Cannot unserialize ' .__CLASS__ );
5353 }
You can’t perform that action at this time.
0 commit comments