updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -16,19 +16,19 @@ namespace Symfony\Component\VarDumper\Cloner;
*
* @author Nicolas Grekas <p@tchwork.com>
*/
class Stub implements \Serializable
class Stub
{
const TYPE_REF = 1;
const TYPE_STRING = 2;
const TYPE_ARRAY = 3;
const TYPE_OBJECT = 4;
const TYPE_RESOURCE = 5;
public const TYPE_REF = 1;
public const TYPE_STRING = 2;
public const TYPE_ARRAY = 3;
public const TYPE_OBJECT = 4;
public const TYPE_RESOURCE = 5;
const STRING_BINARY = 1;
const STRING_UTF8 = 2;
public const STRING_BINARY = 1;
public const STRING_UTF8 = 2;
const ARRAY_ASSOC = 1;
const ARRAY_INDEXED = 2;
public const ARRAY_ASSOC = 1;
public const ARRAY_INDEXED = 2;
public $type = self::TYPE_REF;
public $class = '';
@@ -37,21 +37,31 @@ class Stub implements \Serializable
public $handle = 0;
public $refCount = 0;
public $position = 0;
public $attr = array();
public $attr = [];
private static $defaultProperties = [];
/**
* @internal
*/
public function serialize()
public function __sleep(): array
{
return \serialize(array($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr));
}
$properties = [];
/**
* @internal
*/
public function unserialize($serialized)
{
list($this->class, $this->position, $this->cut, $this->type, $this->value, $this->handle, $this->refCount, $this->attr) = \unserialize($serialized);
if (!isset(self::$defaultProperties[$c = static::class])) {
self::$defaultProperties[$c] = get_class_vars($c);
foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) {
unset(self::$defaultProperties[$c][$k]);
}
}
foreach (self::$defaultProperties[$c] as $k => $v) {
if ($this->$k !== $v) {
$properties[] = $k;
}
}
return $properties;
}
}