You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
string(199) "Error: Class Symfony\Component\Debug\Broken contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Serializable::serialize, Serializable::unserialize)"
40
+
string(179) "Error: Class Symfony\Component\Debug\Broken contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (JsonSerializable::jsonSerialize)"
@@ -34,16 +34,26 @@ abstract class DataCollector implements DataCollectorInterface, \Serializable
34
34
*/
35
35
private$cloner;
36
36
37
+
/**
38
+
* @deprecated since Symfony 4.3, store all the serialized state in the data property instead
39
+
*/
37
40
publicfunctionserialize()
38
41
{
42
+
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.3, store all the serialized state in the data property instead.', __METHOD__), E_USER_DEPRECATED);
* @deprecated since Symfony 4.3, store all the serialized state in the data property instead
52
+
*/
45
53
publicfunctionunserialize($data)
46
54
{
55
+
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.3, store all the serialized state in the data property instead.', __METHOD__), E_USER_DEPRECATED);
@@ -93,4 +103,22 @@ protected function getCasters()
93
103
},
94
104
];
95
105
}
106
+
107
+
publicfunction__sleep()
108
+
{
109
+
if (__CLASS__ !== $c = (new \ReflectionMethod($this, 'serialize'))->getDeclaringClass()->name) {
110
+
@trigger_error(sprintf('Implementing the "%s::serialize()" method is deprecated since Symfony 4.3, store all the serialized state in the "data" property instead.', $c), E_USER_DEPRECATED);
111
+
$this->data = $this->serialize();
112
+
}
113
+
114
+
return ['data'];
115
+
}
116
+
117
+
publicfunction__wakeup()
118
+
{
119
+
if (__CLASS__ !== $c = (new \ReflectionMethod($this, 'unserialize'))->getDeclaringClass()->name) {
120
+
@trigger_error(sprintf('Implementing the "%s::unserialize()" method is deprecated since Symfony 4.3, store all the serialized state in the "data" property instead.', $c), E_USER_DEPRECATED);
0 commit comments