update2
This commit is contained in:
parent
98419bd18d
commit
8a69e45efa
4919 changed files with 28311 additions and 224136 deletions
0
pfosten/vendor/symfony/var-dumper/Caster/AmqpCaster.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/AmqpCaster.php
vendored
Executable file → Normal file
8
pfosten/vendor/symfony/var-dumper/Caster/ArgsStub.php
vendored
Executable file → Normal file
8
pfosten/vendor/symfony/var-dumper/Caster/ArgsStub.php
vendored
Executable file → Normal file
|
|
@ -35,10 +35,10 @@ class ArgsStub extends EnumStub
|
|||
|
||||
return;
|
||||
}
|
||||
if (count($values) < count($params)) {
|
||||
$params = array_slice($params, 0, count($values));
|
||||
} elseif (count($values) > count($params)) {
|
||||
$values[] = new EnumStub(array_splice($values, count($params)), false);
|
||||
if (\count($values) < \count($params)) {
|
||||
$params = \array_slice($params, 0, \count($values));
|
||||
} elseif (\count($values) > \count($params)) {
|
||||
$values[] = new EnumStub(array_splice($values, \count($params)), false);
|
||||
$params[] = $variadic;
|
||||
}
|
||||
if (array('...') === $params) {
|
||||
|
|
|
|||
23
pfosten/vendor/symfony/var-dumper/Caster/Caster.php
vendored
Executable file → Normal file
23
pfosten/vendor/symfony/var-dumper/Caster/Caster.php
vendored
Executable file → Normal file
|
|
@ -49,7 +49,7 @@ class Caster
|
|||
public static function castObject($obj, $class, $hasDebugInfo = false)
|
||||
{
|
||||
if ($class instanceof \ReflectionClass) {
|
||||
@trigger_error(sprintf('Passing a ReflectionClass to %s() is deprecated since version 3.3 and will be unsupported in 4.0. Pass the class name as string instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Passing a ReflectionClass to "%s()" is deprecated since Symfony 3.3 and will be unsupported in 4.0. Pass the class name as string instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
$hasDebugInfo = $class->hasMethod('__debugInfo');
|
||||
$class = $class->name;
|
||||
}
|
||||
|
|
@ -65,11 +65,20 @@ class Caster
|
|||
}
|
||||
|
||||
if ($a) {
|
||||
static $publicProperties = array();
|
||||
|
||||
$i = 0;
|
||||
$prefixedKeys = array();
|
||||
foreach ($a as $k => $v) {
|
||||
if (isset($k[0]) && "\0" !== $k[0] && !property_exists($class, $k)) {
|
||||
$prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k;
|
||||
if (isset($k[0]) ? "\0" !== $k[0] : \PHP_VERSION_ID >= 70200) {
|
||||
if (!isset($publicProperties[$class])) {
|
||||
foreach (get_class_vars($class) as $prop => $v) {
|
||||
$publicProperties[$class][$prop] = true;
|
||||
}
|
||||
}
|
||||
if (!isset($publicProperties[$class][$k])) {
|
||||
$prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k;
|
||||
}
|
||||
} elseif (isset($k[16]) && "\0" === $k[16] && 0 === strpos($k, "\0class@anonymous\0")) {
|
||||
$prefixedKeys[$i] = "\0".get_parent_class($class).'@anonymous'.strrchr($k, "\0");
|
||||
}
|
||||
|
|
@ -109,14 +118,14 @@ class Caster
|
|||
|
||||
if (null === $v) {
|
||||
$type |= self::EXCLUDE_NULL & $filter;
|
||||
}
|
||||
if (empty($v)) {
|
||||
$type |= self::EXCLUDE_EMPTY & $filter;
|
||||
} elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || array() === $v) {
|
||||
$type |= self::EXCLUDE_EMPTY & $filter;
|
||||
}
|
||||
if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !in_array($k, $listedProperties, true)) {
|
||||
if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) {
|
||||
$type |= self::EXCLUDE_NOT_IMPORTANT;
|
||||
}
|
||||
if ((self::EXCLUDE_VERBOSE & $filter) && in_array($k, $listedProperties, true)) {
|
||||
if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) {
|
||||
$type |= self::EXCLUDE_VERBOSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
16
pfosten/vendor/symfony/var-dumper/Caster/ClassStub.php
vendored
Executable file → Normal file
16
pfosten/vendor/symfony/var-dumper/Caster/ClassStub.php
vendored
Executable file → Normal file
|
|
@ -19,8 +19,6 @@ namespace Symfony\Component\VarDumper\Caster;
|
|||
class ClassStub extends ConstStub
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string A PHP identifier, e.g. a class, method, interface, etc. name
|
||||
* @param callable The callable targeted by the identifier when it is ambiguous or not a real PHP identifier
|
||||
*/
|
||||
|
|
@ -29,7 +27,7 @@ class ClassStub extends ConstStub
|
|||
$this->value = $identifier;
|
||||
|
||||
if (0 < $i = strrpos($identifier, '\\')) {
|
||||
$this->attr['ellipsis'] = strlen($identifier) - $i;
|
||||
$this->attr['ellipsis'] = \strlen($identifier) - $i;
|
||||
$this->attr['ellipsis-type'] = 'class';
|
||||
$this->attr['ellipsis-tail'] = 1;
|
||||
}
|
||||
|
|
@ -38,9 +36,9 @@ class ClassStub extends ConstStub
|
|||
if (null !== $callable) {
|
||||
if ($callable instanceof \Closure) {
|
||||
$r = new \ReflectionFunction($callable);
|
||||
} elseif (is_object($callable)) {
|
||||
} elseif (\is_object($callable)) {
|
||||
$r = array($callable, '__invoke');
|
||||
} elseif (is_array($callable)) {
|
||||
} elseif (\is_array($callable)) {
|
||||
$r = $callable;
|
||||
} elseif (false !== $i = strpos($callable, '::')) {
|
||||
$r = array(substr($callable, 0, $i), substr($callable, 2 + $i));
|
||||
|
|
@ -53,7 +51,7 @@ class ClassStub extends ConstStub
|
|||
$r = new \ReflectionClass($identifier);
|
||||
}
|
||||
|
||||
if (is_array($r)) {
|
||||
if (\is_array($r)) {
|
||||
try {
|
||||
$r = new \ReflectionMethod($r[0], $r[1]);
|
||||
} catch (\ReflectionException $e) {
|
||||
|
|
@ -72,13 +70,13 @@ class ClassStub extends ConstStub
|
|||
|
||||
public static function wrapCallable($callable)
|
||||
{
|
||||
if (is_object($callable) || !is_callable($callable)) {
|
||||
if (\is_object($callable) || !\is_callable($callable)) {
|
||||
return $callable;
|
||||
}
|
||||
|
||||
if (!is_array($callable)) {
|
||||
if (!\is_array($callable)) {
|
||||
$callable = new static($callable);
|
||||
} elseif (is_string($callable[0])) {
|
||||
} elseif (\is_string($callable[0])) {
|
||||
$callable[0] = new static($callable[0]);
|
||||
} else {
|
||||
$callable[1] = new static($callable[1], $callable);
|
||||
|
|
|
|||
0
pfosten/vendor/symfony/var-dumper/Caster/ConstStub.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/ConstStub.php
vendored
Executable file → Normal file
2
pfosten/vendor/symfony/var-dumper/Caster/CutArrayStub.php
vendored
Executable file → Normal file
2
pfosten/vendor/symfony/var-dumper/Caster/CutArrayStub.php
vendored
Executable file → Normal file
|
|
@ -25,6 +25,6 @@ class CutArrayStub extends CutStub
|
|||
parent::__construct($value);
|
||||
|
||||
$this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys));
|
||||
$this->cut -= count($this->preservedSubset);
|
||||
$this->cut -= \count($this->preservedSubset);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
8
pfosten/vendor/symfony/var-dumper/Caster/CutStub.php
vendored
Executable file → Normal file
8
pfosten/vendor/symfony/var-dumper/Caster/CutStub.php
vendored
Executable file → Normal file
|
|
@ -24,17 +24,17 @@ class CutStub extends Stub
|
|||
{
|
||||
$this->value = $value;
|
||||
|
||||
switch (gettype($value)) {
|
||||
switch (\gettype($value)) {
|
||||
case 'object':
|
||||
$this->type = self::TYPE_OBJECT;
|
||||
$this->class = get_class($value);
|
||||
$this->class = \get_class($value);
|
||||
$this->cut = -1;
|
||||
break;
|
||||
|
||||
case 'array':
|
||||
$this->type = self::TYPE_ARRAY;
|
||||
$this->class = self::ARRAY_ASSOC;
|
||||
$this->cut = $this->value = count($value);
|
||||
$this->cut = $this->value = \count($value);
|
||||
break;
|
||||
|
||||
case 'resource':
|
||||
|
|
@ -51,7 +51,7 @@ class CutStub extends Stub
|
|||
case 'string':
|
||||
$this->type = self::TYPE_STRING;
|
||||
$this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY;
|
||||
$this->cut = self::STRING_BINARY === $this->class ? strlen($value) : mb_strlen($value, 'UTF-8');
|
||||
$this->cut = self::STRING_BINARY === $this->class ? \strlen($value) : mb_strlen($value, 'UTF-8');
|
||||
$this->value = '';
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
0
pfosten/vendor/symfony/var-dumper/Caster/DOMCaster.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/DOMCaster.php
vendored
Executable file → Normal file
2
pfosten/vendor/symfony/var-dumper/Caster/DoctrineCaster.php
vendored
Executable file → Normal file
2
pfosten/vendor/symfony/var-dumper/Caster/DoctrineCaster.php
vendored
Executable file → Normal file
|
|
@ -12,8 +12,8 @@
|
|||
namespace Symfony\Component\VarDumper\Caster;
|
||||
|
||||
use Doctrine\Common\Proxy\Proxy as CommonProxy;
|
||||
use Doctrine\ORM\Proxy\Proxy as OrmProxy;
|
||||
use Doctrine\ORM\PersistentCollection;
|
||||
use Doctrine\ORM\Proxy\Proxy as OrmProxy;
|
||||
use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
|
||||
/**
|
||||
|
|
|
|||
0
pfosten/vendor/symfony/var-dumper/Caster/EnumStub.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/EnumStub.php
vendored
Executable file → Normal file
56
pfosten/vendor/symfony/var-dumper/Caster/ExceptionCaster.php
vendored
Executable file → Normal file
56
pfosten/vendor/symfony/var-dumper/Caster/ExceptionCaster.php
vendored
Executable file → Normal file
|
|
@ -12,8 +12,8 @@
|
|||
namespace Symfony\Component\VarDumper\Caster;
|
||||
|
||||
use Symfony\Component\Debug\Exception\SilencedErrorContext;
|
||||
use Symfony\Component\VarDumper\Exception\ThrowingCasterException;
|
||||
use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
use Symfony\Component\VarDumper\Exception\ThrowingCasterException;
|
||||
|
||||
/**
|
||||
* Casts common Exception classes to array representation.
|
||||
|
|
@ -71,8 +71,8 @@ class ExceptionCaster
|
|||
|
||||
if (isset($a[$xPrefix.'previous'], $a[$trace]) && $a[$xPrefix.'previous'] instanceof \Exception) {
|
||||
$b = (array) $a[$xPrefix.'previous'];
|
||||
self::traceUnshift($b[$xPrefix.'trace'], get_class($a[$xPrefix.'previous']), $b[$prefix.'file'], $b[$prefix.'line']);
|
||||
$a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -count($a[$trace]->value));
|
||||
self::traceUnshift($b[$xPrefix.'trace'], \get_class($a[$xPrefix.'previous']), $b[$prefix.'file'], $b[$prefix.'line']);
|
||||
$a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -\count($a[$trace]->value));
|
||||
}
|
||||
|
||||
unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']);
|
||||
|
|
@ -83,7 +83,6 @@ class ExceptionCaster
|
|||
public static function castSilencedErrorContext(SilencedErrorContext $e, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
$sPrefix = "\0".SilencedErrorContext::class."\0";
|
||||
$xPrefix = "\0Exception\0";
|
||||
|
||||
if (!isset($a[$s = $sPrefix.'severity'])) {
|
||||
return $a;
|
||||
|
|
@ -93,12 +92,17 @@ class ExceptionCaster
|
|||
$a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]);
|
||||
}
|
||||
|
||||
$trace = array(
|
||||
$trace = array(array(
|
||||
'file' => $a[$sPrefix.'file'],
|
||||
'line' => $a[$sPrefix.'line'],
|
||||
);
|
||||
unset($a[$sPrefix.'file'], $a[$sPrefix.'line']);
|
||||
$a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub(array($trace));
|
||||
));
|
||||
|
||||
if (isset($a[$sPrefix.'trace'])) {
|
||||
$trace = array_merge($trace, $a[$sPrefix.'trace']);
|
||||
}
|
||||
|
||||
unset($a[$sPrefix.'file'], $a[$sPrefix.'line'], $a[$sPrefix.'trace']);
|
||||
$a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs);
|
||||
|
||||
return $a;
|
||||
}
|
||||
|
|
@ -114,7 +118,7 @@ class ExceptionCaster
|
|||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
|
||||
$a = array();
|
||||
$j = count($frames);
|
||||
$j = \count($frames);
|
||||
if (0 > $i = $trace->sliceOffset) {
|
||||
$i = max(0, $j + $i);
|
||||
}
|
||||
|
|
@ -123,6 +127,7 @@ class ExceptionCaster
|
|||
}
|
||||
$lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : '';
|
||||
$frames[] = array('function' => '');
|
||||
$collapse = false;
|
||||
|
||||
for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) {
|
||||
$f = $frames[$i];
|
||||
|
|
@ -141,6 +146,13 @@ class ExceptionCaster
|
|||
$f = self::castFrameStub($frame, array(), $frame, true);
|
||||
if (isset($f[$prefix.'src'])) {
|
||||
foreach ($f[$prefix.'src']->value as $label => $frame) {
|
||||
if (0 === strpos($label, "\0~collapse=0")) {
|
||||
if ($collapse) {
|
||||
$label = substr_replace($label, '1', 11, 1);
|
||||
} else {
|
||||
$collapse = true;
|
||||
}
|
||||
}
|
||||
$label = substr_replace($label, "title=Stack level $j.&", 2, 0);
|
||||
}
|
||||
$f = $frames[$i - 1];
|
||||
|
|
@ -158,12 +170,12 @@ class ExceptionCaster
|
|||
} else {
|
||||
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall;
|
||||
}
|
||||
$a[$label] = $frame;
|
||||
$a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame;
|
||||
|
||||
$lastCall = $call;
|
||||
}
|
||||
if (null !== $trace->sliceLength) {
|
||||
$a = array_slice($a, 0, $trace->sliceLength, true);
|
||||
$a = \array_slice($a, 0, $trace->sliceLength, true);
|
||||
}
|
||||
|
||||
return $a;
|
||||
|
|
@ -187,19 +199,20 @@ class ExceptionCaster
|
|||
$a[$prefix.'src'] = self::$framesCache[$cacheKey];
|
||||
} else {
|
||||
if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) {
|
||||
$f['file'] = substr($f['file'], 0, -strlen($match[0]));
|
||||
$f['file'] = substr($f['file'], 0, -\strlen($match[0]));
|
||||
$f['line'] = (int) $match[1];
|
||||
}
|
||||
$caller = isset($f['function']) ? sprintf('in %s() on line %d', (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'], $f['line']) : null;
|
||||
$src = $f['line'];
|
||||
$srcKey = $f['file'];
|
||||
$ellipsis = (new LinkStub($srcKey, 0))->attr;
|
||||
$ellipsisTail = isset($ellipsis['ellipsis-tail']) ? $ellipsis['ellipsis-tail'] : 0;
|
||||
$ellipsis = isset($ellipsis['ellipsis']) ? $ellipsis['ellipsis'] : 0;
|
||||
$ellipsis = new LinkStub($srcKey, 0);
|
||||
$srcAttr = 'collapse='.(int) $ellipsis->inVendor;
|
||||
$ellipsisTail = isset($ellipsis->attr['ellipsis-tail']) ? $ellipsis->attr['ellipsis-tail'] : 0;
|
||||
$ellipsis = isset($ellipsis->attr['ellipsis']) ? $ellipsis->attr['ellipsis'] : 0;
|
||||
|
||||
if (file_exists($f['file']) && 0 <= self::$srcContext) {
|
||||
if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) {
|
||||
$template = isset($f['object']) ? $f['object'] : unserialize(sprintf('O:%d:"%s":0:{}', strlen($f['class']), $f['class']));
|
||||
$template = isset($f['object']) ? $f['object'] : unserialize(sprintf('O:%d:"%s":0:{}', \strlen($f['class']), $f['class']));
|
||||
|
||||
$ellipsis = 0;
|
||||
$templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : '');
|
||||
|
|
@ -218,11 +231,14 @@ class ExceptionCaster
|
|||
$src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, $caller, 'php', $f['file']);
|
||||
$srcKey .= ':'.$f['line'];
|
||||
if ($ellipsis) {
|
||||
$ellipsis += 1 + strlen($f['line']);
|
||||
$ellipsis += 1 + \strlen($f['line']);
|
||||
}
|
||||
}
|
||||
$srcAttr .= '&separator= ';
|
||||
} else {
|
||||
$srcAttr .= '&separator=:';
|
||||
}
|
||||
$srcAttr = $ellipsis ? 'ellipsis-type=path&ellipsis='.$ellipsis.'&ellipsis-tail='.$ellipsisTail : '';
|
||||
$srcAttr .= $ellipsis ? '&ellipsis-type=path&ellipsis='.$ellipsis.'&ellipsis-tail='.$ellipsisTail : '';
|
||||
self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(array("\0~$srcAttr\0$srcKey" => $src));
|
||||
}
|
||||
}
|
||||
|
|
@ -252,7 +268,7 @@ class ExceptionCaster
|
|||
$trace = array();
|
||||
}
|
||||
|
||||
if (!($filter & Caster::EXCLUDE_VERBOSE)) {
|
||||
if (!($filter & Caster::EXCLUDE_VERBOSE) && $trace) {
|
||||
if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) {
|
||||
self::traceUnshift($trace, $xClass, $a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']);
|
||||
}
|
||||
|
|
@ -325,7 +341,7 @@ class ExceptionCaster
|
|||
}
|
||||
}
|
||||
$c->attr['lang'] = $lang;
|
||||
$srcLines[sprintf("\0~%d\0", $i + $line - $srcContext)] = $c;
|
||||
$srcLines[sprintf("\0~separator=› &%d\0", $i + $line - $srcContext)] = $c;
|
||||
}
|
||||
|
||||
return new EnumStub($srcLines);
|
||||
|
|
|
|||
0
pfosten/vendor/symfony/var-dumper/Caster/FrameStub.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/FrameStub.php
vendored
Executable file → Normal file
32
pfosten/vendor/symfony/var-dumper/Caster/LinkStub.php
vendored
Executable file → Normal file
32
pfosten/vendor/symfony/var-dumper/Caster/LinkStub.php
vendored
Executable file → Normal file
|
|
@ -18,6 +18,8 @@ namespace Symfony\Component\VarDumper\Caster;
|
|||
*/
|
||||
class LinkStub extends ConstStub
|
||||
{
|
||||
public $inVendor = false;
|
||||
|
||||
private static $vendorRoots;
|
||||
private static $composerRoots;
|
||||
|
||||
|
|
@ -28,7 +30,7 @@ class LinkStub extends ConstStub
|
|||
if (null === $href) {
|
||||
$href = $label;
|
||||
}
|
||||
if (!is_string($href)) {
|
||||
if (!\is_string($href)) {
|
||||
return;
|
||||
}
|
||||
if (0 === strpos($href, 'file://')) {
|
||||
|
|
@ -50,12 +52,12 @@ class LinkStub extends ConstStub
|
|||
if ($label !== $this->attr['file'] = realpath($href) ?: $href) {
|
||||
return;
|
||||
}
|
||||
if ($composerRoot = $this->getComposerRoot($href, $inVendor)) {
|
||||
$this->attr['ellipsis'] = strlen($href) - strlen($composerRoot) + 1;
|
||||
if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) {
|
||||
$this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1;
|
||||
$this->attr['ellipsis-type'] = 'path';
|
||||
$this->attr['ellipsis-tail'] = 1 + ($inVendor ? 2 + strlen(implode(array_slice(explode(DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0);
|
||||
} elseif (3 < count($ellipsis = explode(DIRECTORY_SEPARATOR, $href))) {
|
||||
$this->attr['ellipsis'] = 2 + strlen(implode(array_slice($ellipsis, -2)));
|
||||
$this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode(\array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0);
|
||||
} elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) {
|
||||
$this->attr['ellipsis'] = 2 + \strlen(implode(\array_slice($ellipsis, -2)));
|
||||
$this->attr['ellipsis-type'] = 'path';
|
||||
$this->attr['ellipsis-tail'] = 1;
|
||||
}
|
||||
|
|
@ -69,16 +71,16 @@ class LinkStub extends ConstStub
|
|||
foreach (get_declared_classes() as $class) {
|
||||
if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
|
||||
$r = new \ReflectionClass($class);
|
||||
$v = dirname(dirname($r->getFileName()));
|
||||
$v = \dirname(\dirname($r->getFileName()));
|
||||
if (file_exists($v.'/composer/installed.json')) {
|
||||
self::$vendorRoots[] = $v.DIRECTORY_SEPARATOR;
|
||||
self::$vendorRoots[] = $v.\DIRECTORY_SEPARATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$inVendor = false;
|
||||
|
||||
if (isset(self::$composerRoots[$dir = dirname($file)])) {
|
||||
if (isset(self::$composerRoots[$dir = \dirname($file)])) {
|
||||
return self::$composerRoots[$dir];
|
||||
}
|
||||
|
||||
|
|
@ -89,14 +91,18 @@ class LinkStub extends ConstStub
|
|||
}
|
||||
|
||||
$parent = $dir;
|
||||
while (!file_exists($parent.'/composer.json')) {
|
||||
if ($parent === dirname($parent)) {
|
||||
while (!@file_exists($parent.'/composer.json')) {
|
||||
if (!@file_exists($parent)) {
|
||||
// open_basedir restriction in effect
|
||||
break;
|
||||
}
|
||||
if ($parent === \dirname($parent)) {
|
||||
return self::$composerRoots[$dir] = false;
|
||||
}
|
||||
|
||||
$parent = dirname($parent);
|
||||
$parent = \dirname($parent);
|
||||
}
|
||||
|
||||
return self::$composerRoots[$dir] = $parent.DIRECTORY_SEPARATOR;
|
||||
return self::$composerRoots[$dir] = $parent.\DIRECTORY_SEPARATOR;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
4
pfosten/vendor/symfony/var-dumper/Caster/MongoCaster.php
vendored
Executable file → Normal file
4
pfosten/vendor/symfony/var-dumper/Caster/MongoCaster.php
vendored
Executable file → Normal file
|
|
@ -13,10 +13,14 @@ namespace Symfony\Component\VarDumper\Caster;
|
|||
|
||||
use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
|
||||
@trigger_error('The '.__NAMESPACE__.'\MongoCaster class is deprecated since Symfony 3.4 and will be removed in 4.0.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* Casts classes from the MongoDb extension to array representation.
|
||||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*
|
||||
* @deprecated since version 3.4, to be removed in 4.0.
|
||||
*/
|
||||
class MongoCaster
|
||||
{
|
||||
|
|
|
|||
2
pfosten/vendor/symfony/var-dumper/Caster/PdoCaster.php
vendored
Executable file → Normal file
2
pfosten/vendor/symfony/var-dumper/Caster/PdoCaster.php
vendored
Executable file → Normal file
|
|
@ -70,7 +70,7 @@ class PdoCaster
|
|||
}
|
||||
|
||||
try {
|
||||
$attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(constant('PDO::ATTR_'.$k));
|
||||
$attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(\constant('PDO::ATTR_'.$k));
|
||||
if ($v && isset($v[$attr[$k]])) {
|
||||
$attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]);
|
||||
}
|
||||
|
|
|
|||
0
pfosten/vendor/symfony/var-dumper/Caster/PgSqlCaster.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/PgSqlCaster.php
vendored
Executable file → Normal file
4
pfosten/vendor/symfony/var-dumper/Caster/RedisCaster.php
vendored
Executable file → Normal file
4
pfosten/vendor/symfony/var-dumper/Caster/RedisCaster.php
vendored
Executable file → Normal file
|
|
@ -30,7 +30,7 @@ class RedisCaster
|
|||
{
|
||||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
|
||||
if (defined('HHVM_VERSION_ID')) {
|
||||
if (\defined('HHVM_VERSION_ID')) {
|
||||
if (isset($a[Caster::PREFIX_PROTECTED.'serializer'])) {
|
||||
$ser = $a[Caster::PREFIX_PROTECTED.'serializer'];
|
||||
$a[Caster::PREFIX_PROTECTED.'serializer'] = isset(self::$serializer[$ser]) ? new ConstStub(self::$serializer[$ser], $ser) : $ser;
|
||||
|
|
@ -46,7 +46,7 @@ class RedisCaster
|
|||
}
|
||||
|
||||
$ser = $c->getOption(\Redis::OPT_SERIALIZER);
|
||||
$retry = defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0;
|
||||
$retry = \defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0;
|
||||
|
||||
return $a + array(
|
||||
$prefix.'isConnected' => $connected,
|
||||
|
|
|
|||
4
pfosten/vendor/symfony/var-dumper/Caster/ReflectionCaster.php
vendored
Executable file → Normal file
4
pfosten/vendor/symfony/var-dumper/Caster/ReflectionCaster.php
vendored
Executable file → Normal file
|
|
@ -122,7 +122,7 @@ class ReflectionCaster
|
|||
$function = new FrameStub($frame, false, true);
|
||||
$function = ExceptionCaster::castFrameStub($function, array(), $function, true);
|
||||
$a[$prefix.'executing'] = new EnumStub(array(
|
||||
$frame['class'].$frame['type'].$frame['function'].'()' => $function[$prefix.'src'],
|
||||
"\0~separator= \0".$frame['class'].$frame['type'].$frame['function'].'()' => $function[$prefix.'src'],
|
||||
));
|
||||
}
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ class ReflectionCaster
|
|||
|
||||
if ($v = $c->getStaticVariables()) {
|
||||
foreach ($v as $k => &$v) {
|
||||
if (is_object($v)) {
|
||||
if (\is_object($v)) {
|
||||
$a[$prefix.'use']['$'.$k] = new CutStub($v);
|
||||
} else {
|
||||
$a[$prefix.'use']['$'.$k] = &$v;
|
||||
|
|
|
|||
2
pfosten/vendor/symfony/var-dumper/Caster/ResourceCaster.php
vendored
Executable file → Normal file
2
pfosten/vendor/symfony/var-dumper/Caster/ResourceCaster.php
vendored
Executable file → Normal file
|
|
@ -50,7 +50,7 @@ class ResourceCaster
|
|||
|
||||
public static function castStreamContext($stream, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
return stream_context_get_params($stream);
|
||||
return @stream_context_get_params($stream) ?: $a;
|
||||
}
|
||||
|
||||
public static function castGd($gd, array $a, Stub $stub, $isNested)
|
||||
|
|
|
|||
58
pfosten/vendor/symfony/var-dumper/Caster/SplCaster.php
vendored
Executable file → Normal file
58
pfosten/vendor/symfony/var-dumper/Caster/SplCaster.php
vendored
Executable file → Normal file
|
|
@ -29,30 +29,12 @@ class SplCaster
|
|||
|
||||
public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
$class = $stub->class;
|
||||
$flags = $c->getFlags();
|
||||
return self::castSplArray($c, $a, $stub, $isNested);
|
||||
}
|
||||
|
||||
$b = array(
|
||||
$prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST),
|
||||
$prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS),
|
||||
$prefix.'iteratorClass' => new ClassStub($c->getIteratorClass()),
|
||||
$prefix.'storage' => $c->getArrayCopy(),
|
||||
);
|
||||
|
||||
if ($class === 'ArrayObject') {
|
||||
$a = $b;
|
||||
} else {
|
||||
if (!($flags & \ArrayObject::STD_PROP_LIST)) {
|
||||
$c->setFlags(\ArrayObject::STD_PROP_LIST);
|
||||
$a = Caster::castObject($c, $class);
|
||||
$c->setFlags($flags);
|
||||
}
|
||||
|
||||
$a += $b;
|
||||
}
|
||||
|
||||
return $a;
|
||||
public static function castArrayIterator(\ArrayIterator $c, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
return self::castSplArray($c, $a, $stub, $isNested);
|
||||
}
|
||||
|
||||
public static function castHeap(\Iterator $c, array $a, Stub $stub, $isNested)
|
||||
|
|
@ -184,10 +166,11 @@ class SplCaster
|
|||
$storage = array();
|
||||
unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967
|
||||
|
||||
foreach ($c as $obj) {
|
||||
$storage[spl_object_hash($obj)] = array(
|
||||
$clone = clone $c;
|
||||
foreach ($clone as $obj) {
|
||||
$storage[] = array(
|
||||
'object' => $obj,
|
||||
'info' => $c->getInfo(),
|
||||
'info' => $clone->getInfo(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -204,4 +187,27 @@ class SplCaster
|
|||
|
||||
return $a;
|
||||
}
|
||||
|
||||
private static function castSplArray($c, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
$class = $stub->class;
|
||||
$flags = $c->getFlags();
|
||||
|
||||
if (!($flags & \ArrayObject::STD_PROP_LIST)) {
|
||||
$c->setFlags(\ArrayObject::STD_PROP_LIST);
|
||||
$a = Caster::castObject($c, $class);
|
||||
$c->setFlags($flags);
|
||||
}
|
||||
$a += array(
|
||||
$prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST),
|
||||
$prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS),
|
||||
);
|
||||
if ($c instanceof \ArrayObject) {
|
||||
$a[$prefix.'iteratorClass'] = new ClassStub($c->getIteratorClass());
|
||||
}
|
||||
$a[$prefix.'storage'] = $c->getArrayCopy();
|
||||
|
||||
return $a;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
4
pfosten/vendor/symfony/var-dumper/Caster/StubCaster.php
vendored
Executable file → Normal file
4
pfosten/vendor/symfony/var-dumper/Caster/StubCaster.php
vendored
Executable file → Normal file
|
|
@ -30,7 +30,7 @@ class StubCaster
|
|||
$stub->cut = $c->cut;
|
||||
$stub->attr = $c->attr;
|
||||
|
||||
if (Stub::TYPE_REF === $c->type && !$c->class && is_string($c->value) && !preg_match('//u', $c->value)) {
|
||||
if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) {
|
||||
$stub->type = Stub::TYPE_STRING;
|
||||
$stub->class = Stub::STRING_BINARY;
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ class StubCaster
|
|||
public static function cutInternals($obj, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
if ($isNested) {
|
||||
$stub->cut += count($a);
|
||||
$stub->cut += \count($a);
|
||||
|
||||
return array();
|
||||
}
|
||||
|
|
|
|||
0
pfosten/vendor/symfony/var-dumper/Caster/SymfonyCaster.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/SymfonyCaster.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/TraceStub.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/TraceStub.php
vendored
Executable file → Normal file
48
pfosten/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php
vendored
Executable file → Normal file
48
pfosten/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php
vendored
Executable file → Normal file
|
|
@ -20,27 +20,27 @@ use Symfony\Component\VarDumper\Cloner\Stub;
|
|||
class XmlReaderCaster
|
||||
{
|
||||
private static $nodeTypes = array(
|
||||
\XmlReader::NONE => 'NONE',
|
||||
\XmlReader::ELEMENT => 'ELEMENT',
|
||||
\XmlReader::ATTRIBUTE => 'ATTRIBUTE',
|
||||
\XmlReader::TEXT => 'TEXT',
|
||||
\XmlReader::CDATA => 'CDATA',
|
||||
\XmlReader::ENTITY_REF => 'ENTITY_REF',
|
||||
\XmlReader::ENTITY => 'ENTITY',
|
||||
\XmlReader::PI => 'PI (Processing Instruction)',
|
||||
\XmlReader::COMMENT => 'COMMENT',
|
||||
\XmlReader::DOC => 'DOC',
|
||||
\XmlReader::DOC_TYPE => 'DOC_TYPE',
|
||||
\XmlReader::DOC_FRAGMENT => 'DOC_FRAGMENT',
|
||||
\XmlReader::NOTATION => 'NOTATION',
|
||||
\XmlReader::WHITESPACE => 'WHITESPACE',
|
||||
\XmlReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE',
|
||||
\XmlReader::END_ELEMENT => 'END_ELEMENT',
|
||||
\XmlReader::END_ENTITY => 'END_ENTITY',
|
||||
\XmlReader::XML_DECLARATION => 'XML_DECLARATION',
|
||||
\XMLReader::NONE => 'NONE',
|
||||
\XMLReader::ELEMENT => 'ELEMENT',
|
||||
\XMLReader::ATTRIBUTE => 'ATTRIBUTE',
|
||||
\XMLReader::TEXT => 'TEXT',
|
||||
\XMLReader::CDATA => 'CDATA',
|
||||
\XMLReader::ENTITY_REF => 'ENTITY_REF',
|
||||
\XMLReader::ENTITY => 'ENTITY',
|
||||
\XMLReader::PI => 'PI (Processing Instruction)',
|
||||
\XMLReader::COMMENT => 'COMMENT',
|
||||
\XMLReader::DOC => 'DOC',
|
||||
\XMLReader::DOC_TYPE => 'DOC_TYPE',
|
||||
\XMLReader::DOC_FRAGMENT => 'DOC_FRAGMENT',
|
||||
\XMLReader::NOTATION => 'NOTATION',
|
||||
\XMLReader::WHITESPACE => 'WHITESPACE',
|
||||
\XMLReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE',
|
||||
\XMLReader::END_ELEMENT => 'END_ELEMENT',
|
||||
\XMLReader::END_ENTITY => 'END_ENTITY',
|
||||
\XMLReader::XML_DECLARATION => 'XML_DECLARATION',
|
||||
);
|
||||
|
||||
public static function castXmlReader(\XmlReader $reader, array $a, Stub $stub, $isNested)
|
||||
public static function castXmlReader(\XMLReader $reader, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
$props = Caster::PREFIX_VIRTUAL.'parserProperties';
|
||||
$info = array(
|
||||
|
|
@ -49,17 +49,17 @@ class XmlReaderCaster
|
|||
'nodeType' => new ConstStub(self::$nodeTypes[$reader->nodeType], $reader->nodeType),
|
||||
'depth' => $reader->depth,
|
||||
'isDefault' => $reader->isDefault,
|
||||
'isEmptyElement' => \XmlReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement,
|
||||
'isEmptyElement' => \XMLReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement,
|
||||
'xmlLang' => $reader->xmlLang,
|
||||
'attributeCount' => $reader->attributeCount,
|
||||
'value' => $reader->value,
|
||||
'namespaceURI' => $reader->namespaceURI,
|
||||
'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI,
|
||||
$props => array(
|
||||
'LOADDTD' => $reader->getParserProperty(\XmlReader::LOADDTD),
|
||||
'DEFAULTATTRS' => $reader->getParserProperty(\XmlReader::DEFAULTATTRS),
|
||||
'VALIDATE' => $reader->getParserProperty(\XmlReader::VALIDATE),
|
||||
'SUBST_ENTITIES' => $reader->getParserProperty(\XmlReader::SUBST_ENTITIES),
|
||||
'LOADDTD' => $reader->getParserProperty(\XMLReader::LOADDTD),
|
||||
'DEFAULTATTRS' => $reader->getParserProperty(\XMLReader::DEFAULTATTRS),
|
||||
'VALIDATE' => $reader->getParserProperty(\XMLReader::VALIDATE),
|
||||
'SUBST_ENTITIES' => $reader->getParserProperty(\XMLReader::SUBST_ENTITIES),
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
|||
0
pfosten/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php
vendored
Executable file → Normal file
0
pfosten/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php
vendored
Executable file → Normal file
Loading…
Add table
Add a link
Reference in a new issue