Skip to content

Commit 64b9737

Browse files
renanbrnicolas-grekas
authored andcommitted
Drop \Serializable
1 parent aee39f1 commit 64b9737

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CHANGELOG
88
option is set to `single_text`
99
* added `block_prefix` option to `BaseType`.
1010
* added `help_html` option to display the `help` text as HTML.
11+
* `FormError` doesn't implement `Serializable` anymore
1112
* added `label_translation_parameters`, `attr_translation_parameters`, `help_translation_parameters` options
1213
to `FormType` to pass translation parameters to form labels, attributes (`placeholder` and `title`) and help text respectively.
1314
The passed parameters will replace placeholders in translation messages.
@@ -32,7 +33,6 @@ CHANGELOG
3233
}
3334
```
3435

35-
3636
4.2.0
3737
-----
3838

FormError.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* @author Bernhard Schussek <[email protected]>
2020
*/
21-
class FormError implements \Serializable
21+
class FormError
2222
{
2323
protected $messageTemplate;
2424
protected $messageParameters;
@@ -133,26 +133,4 @@ public function getOrigin()
133133
{
134134
return $this->origin;
135135
}
136-
137-
/**
138-
* @internal
139-
*/
140-
public function serialize()
141-
{
142-
return serialize([
143-
$this->message,
144-
$this->messageTemplate,
145-
$this->messageParameters,
146-
$this->messagePluralization,
147-
$this->cause,
148-
]);
149-
}
150-
151-
/**
152-
* @internal
153-
*/
154-
public function unserialize($serialized)
155-
{
156-
list($this->message, $this->messageTemplate, $this->messageParameters, $this->messagePluralization, $this->cause) = unserialize($serialized, ['allowed_classes' => false]);
157-
}
158136
}

Tests/Extension/DataCollector/FormDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ public function testSerializeWithFormAddedMultipleTimes()
448448
$this->dataCollector->collectViewVariables($form2View);
449449
$this->dataCollector->buildFinalFormTree($form2, $form2View);
450450

451-
$this->dataCollector->serialize();
451+
serialize($this->dataCollector);
452452
}
453453

454454
public function testFinalFormReliesOnFormViewStructure()

0 commit comments

Comments
 (0)