mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
✅ Make unit tests working
This commit is contained in:
@@ -65,7 +65,7 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf
|
||||
public function __construct(FormDataExtractorInterface $dataExtractor)
|
||||
{
|
||||
if (!class_exists(ClassStub::class)) {
|
||||
throw new \LogicException(sprintf('The VarDumper component is needed for using the "%s" class. Install symfony/var-dumper version 3.4 or above.', __CLASS__));
|
||||
throw new \LogicException(\sprintf('The VarDumper component is needed for using the "%s" class. Install symfony/var-dumper version 3.4 or above.', __CLASS__));
|
||||
}
|
||||
|
||||
$this->dataExtractor = $dataExtractor;
|
||||
@@ -200,10 +200,7 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __sleep(): array
|
||||
public function __serialize(): array
|
||||
{
|
||||
foreach ($this->data['forms_by_hash'] as &$form) {
|
||||
if (isset($form['type_class']) && !$form['type_class'] instanceof ClassStub) {
|
||||
@@ -211,9 +208,7 @@ class FormDataCollector extends DataCollector implements FormDataCollectorInterf
|
||||
}
|
||||
}
|
||||
|
||||
$this->data = $this->cloneVar($this->data);
|
||||
|
||||
return parent::__sleep();
|
||||
return ['data' => $this->data = $this->cloneVar($this->data)];
|
||||
}
|
||||
|
||||
protected function getCasters(): array
|
||||
|
||||
Reference in New Issue
Block a user