File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -200,17 +200,15 @@ public function getData(): array|Data
200200 /**
201201 * @internal
202202 */
203- public function __sleep (): array
203+ public function __serialize (): array
204204 {
205205 foreach ($ this ->data ['forms_by_hash ' ] as &$ form ) {
206206 if (isset ($ form ['type_class ' ]) && !$ form ['type_class ' ] instanceof ClassStub) {
207207 $ form ['type_class ' ] = new ClassStub ($ form ['type_class ' ]);
208208 }
209209 }
210210
211- $ this ->data = $ this ->cloneVar ($ this ->data );
212-
213- return parent ::__sleep ();
211+ return ['data ' => $ this ->data = $ this ->cloneVar ($ this ->data )];
214212 }
215213
216214 protected function getCasters (): array
Original file line number Diff line number Diff line change @@ -51,12 +51,12 @@ public function __construct(
5151 $ this ->managedCursors [$ this ->cursorId ] = &$ this ->cursor ;
5252 }
5353
54- public function __sleep (): array
54+ public function __serialize (): array
5555 {
5656 throw new \BadMethodCallException ('Cannot serialize ' .__CLASS__ );
5757 }
5858
59- public function __wakeup ( ): void
59+ public function __unserialize ( array $ data ): void
6060 {
6161 throw new \BadMethodCallException ('Cannot unserialize ' .__CLASS__ );
6262 }
You can’t perform that action at this time.
0 commit comments