diff vendor/symfony/var-dumper/Cloner/Stub.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children 12f9dff5fda9
line wrap: on
line diff
--- a/vendor/symfony/var-dumper/Cloner/Stub.php	Thu Feb 28 11:14:44 2019 +0000
+++ b/vendor/symfony/var-dumper/Cloner/Stub.php	Thu Feb 28 13:11:55 2019 +0000
@@ -16,7 +16,7 @@
  *
  * @author Nicolas Grekas <p@tchwork.com>
  */
-class Stub implements \Serializable
+class Stub
 {
     const TYPE_REF = 1;
     const TYPE_STRING = 2;
@@ -37,21 +37,24 @@
     public $handle = 0;
     public $refCount = 0;
     public $position = 0;
-    public $attr = array();
+    public $attr = [];
 
     /**
      * @internal
      */
-    public function serialize()
+    public function __sleep()
     {
-        return \serialize(array($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr));
+        $this->serialized = [$this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr];
+
+        return ['serialized'];
     }
 
     /**
      * @internal
      */
-    public function unserialize($serialized)
+    public function __wakeup()
     {
-        list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = \unserialize($serialized);
+        list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = $this->serialized;
+        unset($this->serialized);
     }
 }