Skip to content

Commit 78d7e25

Browse files
Merge branch '6.4' into 7.3
* 6.4: Replace __sleep/wakeup() by __(un)serialize() for throwing and internal usages
2 parents 190d975 + 1f0995f commit 78d7e25

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

Extension/DataCollector/FormDataCollector.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,20 +197,15 @@ public function getData(): array|Data
197197
return $this->data;
198198
}
199199

200-
/**
201-
* @internal
202-
*/
203-
public function __sleep(): array
200+
public function __serialize(): array
204201
{
205202
foreach ($this->data['forms_by_hash'] as &$form) {
206203
if (isset($form['type_class']) && !$form['type_class'] instanceof ClassStub) {
207204
$form['type_class'] = new ClassStub($form['type_class']);
208205
}
209206
}
210207

211-
$this->data = $this->cloneVar($this->data);
212-
213-
return parent::__sleep();
208+
return ['data' => $this->data = $this->cloneVar($this->data)];
214209
}
215210

216211
protected function getCasters(): array

Util/OrderedHashMapIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)