mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
Merge branch '1.x' into 2.x
* 1.x: fixed CS Disable xdebug var_dump overload for tests Prepare for the new serialization mechanism
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
<php>
|
||||
<ini name="error_reporting" value="-1" />
|
||||
<ini name="xdebug.overload_var_dump" value="0" />
|
||||
</php>
|
||||
|
||||
<listeners>
|
||||
|
||||
@@ -164,12 +164,28 @@ class Profile implements \IteratorAggregate, \Serializable
|
||||
|
||||
public function serialize()
|
||||
{
|
||||
return serialize([$this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles]);
|
||||
return serialize($this->__serialize());
|
||||
}
|
||||
|
||||
public function unserialize($data)
|
||||
{
|
||||
list($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles) = unserialize($data);
|
||||
$this->__unserialize(unserialize($data));
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __serialize()
|
||||
{
|
||||
return [$this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles];
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __unserialize(array $data)
|
||||
{
|
||||
list($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles) = $data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user