Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
@@ -22,7 +22,7 @@ class ArgsStub extends EnumStub
|
||||
{
|
||||
private static $parameters = array();
|
||||
|
||||
public function __construct(array $args, $function, $class)
|
||||
public function __construct(array $args, string $function, ?string $class)
|
||||
{
|
||||
list($variadic, $params) = self::getParameters($function, $class);
|
||||
|
||||
@@ -68,7 +68,7 @@ class ArgsStub extends EnumStub
|
||||
if ($v->isPassedByReference()) {
|
||||
$k = '&'.$k;
|
||||
}
|
||||
if (method_exists($v, 'isVariadic') && $v->isVariadic()) {
|
||||
if ($v->isVariadic()) {
|
||||
$variadic .= $k;
|
||||
} else {
|
||||
$params[] = $k;
|
||||
|
5
vendor/symfony/var-dumper/Caster/Caster.php
vendored
5
vendor/symfony/var-dumper/Caster/Caster.php
vendored
@@ -48,11 +48,6 @@ 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 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;
|
||||
}
|
||||
if ($hasDebugInfo) {
|
||||
$a = $obj->__debugInfo();
|
||||
} elseif ($obj instanceof \Closure) {
|
||||
|
@@ -22,7 +22,7 @@ class ClassStub extends ConstStub
|
||||
* @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
|
||||
*/
|
||||
public function __construct($identifier, $callable = null)
|
||||
public function __construct(string $identifier, $callable = null)
|
||||
{
|
||||
$this->value = $identifier;
|
||||
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
*/
|
||||
class ConstStub extends Stub
|
||||
{
|
||||
public function __construct($name, $value)
|
||||
public function __construct(string $name, $value)
|
||||
{
|
||||
$this->class = $name;
|
||||
$this->value = $value;
|
||||
|
17
vendor/symfony/var-dumper/Caster/DateCaster.php
vendored
17
vendor/symfony/var-dumper/Caster/DateCaster.php
vendored
@@ -20,6 +20,8 @@ use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
*/
|
||||
class DateCaster
|
||||
{
|
||||
private const PERIOD_LIMIT = 3;
|
||||
|
||||
public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, $isNested, $filter)
|
||||
{
|
||||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
@@ -61,12 +63,7 @@ class DateCaster
|
||||
$format .= ($i->y ? '%yy ' : '').($i->m ? '%mm ' : '').($i->d ? '%dd ' : '');
|
||||
}
|
||||
|
||||
if (\PHP_VERSION_ID >= 70100 && isset($i->f)) {
|
||||
$format .= $i->h || $i->i || $i->s || $i->f ? '%H:%I:'.self::formatSeconds($i->s, substr($i->f, 2)) : '';
|
||||
} else {
|
||||
$format .= $i->h || $i->i || $i->s ? '%H:%I:%S' : '';
|
||||
}
|
||||
|
||||
$format .= $i->h || $i->i || $i->s || $i->f ? '%H:%I:'.self::formatSeconds($i->s, substr($i->f, 2)) : '';
|
||||
$format = '%R ' === $format ? '0s' : $format;
|
||||
|
||||
return $i->format(rtrim($format));
|
||||
@@ -76,7 +73,7 @@ class DateCaster
|
||||
{
|
||||
$location = $timeZone->getLocation();
|
||||
$formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P');
|
||||
$title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code'], \Locale::getDefault()) : '';
|
||||
$title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : '';
|
||||
|
||||
$z = array(Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title));
|
||||
|
||||
@@ -85,14 +82,10 @@ class DateCaster
|
||||
|
||||
public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, $isNested, $filter)
|
||||
{
|
||||
if (\defined('HHVM_VERSION_ID') || \PHP_VERSION_ID < 50620 || (\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70005)) { // see https://bugs.php.net/bug.php?id=71635
|
||||
return $a;
|
||||
}
|
||||
|
||||
$dates = array();
|
||||
if (\PHP_VERSION_ID >= 70107) { // see https://bugs.php.net/bug.php?id=74639
|
||||
foreach (clone $p as $i => $d) {
|
||||
if (3 === $i) {
|
||||
if (self::PERIOD_LIMIT === $i) {
|
||||
$now = new \DateTimeImmutable();
|
||||
$dates[] = sprintf('%s more', ($end = $p->getEndDate())
|
||||
? ceil(($end->format('U.u') - $d->format('U.u')) / ($now->add($p->getDateInterval())->format('U.u') - $now->format('U.u')))
|
||||
|
@@ -22,7 +22,7 @@ class EnumStub extends Stub
|
||||
{
|
||||
public $dumpKeys = true;
|
||||
|
||||
public function __construct(array $values, $dumpKeys = true)
|
||||
public function __construct(array $values, bool $dumpKeys = true)
|
||||
{
|
||||
$this->value = $values;
|
||||
$this->dumpKeys = $dumpKeys;
|
||||
|
@@ -21,7 +21,7 @@ class FrameStub extends EnumStub
|
||||
public $keepArgs;
|
||||
public $inTraceStub;
|
||||
|
||||
public function __construct(array $frame, $keepArgs = true, $inTraceStub = false)
|
||||
public function __construct(array $frame, bool $keepArgs = true, bool $inTraceStub = false)
|
||||
{
|
||||
$this->value = $frame;
|
||||
$this->keepArgs = $keepArgs;
|
||||
|
30
vendor/symfony/var-dumper/Caster/GmpCaster.php
vendored
Normal file
30
vendor/symfony/var-dumper/Caster/GmpCaster.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarDumper\Caster;
|
||||
|
||||
use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
|
||||
/**
|
||||
* Casts GMP objects to array representation.
|
||||
*
|
||||
* @author Hamza Amrouche <hamza.simperfit@gmail.com>
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
class GmpCaster
|
||||
{
|
||||
public static function castGmp(\GMP $gmp, array $a, Stub $stub, $isNested, $filter): array
|
||||
{
|
||||
$a[Caster::PREFIX_VIRTUAL.'value'] = new ConstStub(gmp_strval($gmp), gmp_strval($gmp));
|
||||
|
||||
return $a;
|
||||
}
|
||||
}
|
@@ -23,7 +23,7 @@ class LinkStub extends ConstStub
|
||||
private static $vendorRoots;
|
||||
private static $composerRoots;
|
||||
|
||||
public function __construct($label, $line = 0, $href = null)
|
||||
public function __construct($label, int $line = 0, $href = null)
|
||||
{
|
||||
$this->value = $label;
|
||||
|
||||
|
38
vendor/symfony/var-dumper/Caster/MongoCaster.php
vendored
38
vendor/symfony/var-dumper/Caster/MongoCaster.php
vendored
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
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
|
||||
{
|
||||
public static function castCursor(\MongoCursorInterface $cursor, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
if ($info = $cursor->info()) {
|
||||
foreach ($info as $k => $v) {
|
||||
$a[Caster::PREFIX_VIRTUAL.$k] = $v;
|
||||
}
|
||||
}
|
||||
$a[Caster::PREFIX_VIRTUAL.'dead'] = $cursor->dead();
|
||||
|
||||
return $a;
|
||||
}
|
||||
}
|
@@ -30,15 +30,6 @@ class RedisCaster
|
||||
{
|
||||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
return $a;
|
||||
}
|
||||
|
||||
if (!$connected = $c->isConnected()) {
|
||||
return $a + array(
|
||||
$prefix.'isConnected' => $connected,
|
||||
|
@@ -36,7 +36,6 @@ class ReflectionCaster
|
||||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
$c = new \ReflectionFunction($c);
|
||||
|
||||
$stub->class = 'Closure'; // HHVM generates unique class names for closures
|
||||
$a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter);
|
||||
|
||||
if (isset($a[$prefix.'parameters'])) {
|
||||
@@ -86,7 +85,7 @@ class ReflectionCaster
|
||||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
|
||||
$a += array(
|
||||
$prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : $c->__toString(),
|
||||
$prefix.'name' => $c->getName(),
|
||||
$prefix.'allowsNull' => $c->allowsNull(),
|
||||
$prefix.'isBuiltin' => $c->isBuiltin(),
|
||||
);
|
||||
@@ -173,7 +172,7 @@ class ReflectionCaster
|
||||
|
||||
if (isset($a[$prefix.'returnType'])) {
|
||||
$v = $a[$prefix.'returnType'];
|
||||
$v = $v instanceof \ReflectionNamedType ? $v->getName() : $v->__toString();
|
||||
$v = $v->getName();
|
||||
$a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType']->allowsNull() ? '?'.$v : $v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', ''));
|
||||
}
|
||||
if (isset($a[$prefix.'class'])) {
|
||||
@@ -185,7 +184,7 @@ class ReflectionCaster
|
||||
|
||||
foreach ($c->getParameters() as $v) {
|
||||
$k = '$'.$v->name;
|
||||
if (method_exists($v, 'isVariadic') && $v->isVariadic()) {
|
||||
if ($v->isVariadic()) {
|
||||
$k = '...'.$k;
|
||||
}
|
||||
if ($v->isPassedByReference()) {
|
||||
@@ -213,9 +212,6 @@ class ReflectionCaster
|
||||
self::addExtra($a, $c);
|
||||
}
|
||||
|
||||
// Added by HHVM
|
||||
unset($a[Caster::PREFIX_DYNAMIC.'static']);
|
||||
|
||||
return $a;
|
||||
}
|
||||
|
||||
@@ -230,9 +226,6 @@ class ReflectionCaster
|
||||
{
|
||||
$prefix = Caster::PREFIX_VIRTUAL;
|
||||
|
||||
// Added by HHVM
|
||||
unset($a['info']);
|
||||
|
||||
self::addMap($a, $c, array(
|
||||
'position' => 'getPosition',
|
||||
'isVariadic' => 'isVariadic',
|
||||
@@ -240,12 +233,8 @@ class ReflectionCaster
|
||||
'allowsNull' => 'allowsNull',
|
||||
));
|
||||
|
||||
if (method_exists($c, 'getType')) {
|
||||
if ($v = $c->getType()) {
|
||||
$a[$prefix.'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : $v->__toString();
|
||||
}
|
||||
} elseif (preg_match('/^(?:[^ ]++ ){4}([a-zA-Z_\x7F-\xFF][^ ]++)/', $c, $v)) {
|
||||
$a[$prefix.'typeHint'] = $v[1];
|
||||
if ($v = $c->getType()) {
|
||||
$a[$prefix.'typeHint'] = $v->getName();
|
||||
}
|
||||
|
||||
if (isset($a[$prefix.'typeHint'])) {
|
||||
@@ -257,17 +246,13 @@ class ReflectionCaster
|
||||
|
||||
try {
|
||||
$a[$prefix.'default'] = $v = $c->getDefaultValue();
|
||||
if (method_exists($c, 'isDefaultValueConstant') && $c->isDefaultValueConstant()) {
|
||||
if ($c->isDefaultValueConstant()) {
|
||||
$a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v);
|
||||
}
|
||||
if (null === $v) {
|
||||
unset($a[$prefix.'allowsNull']);
|
||||
}
|
||||
} catch (\ReflectionException $e) {
|
||||
if (isset($a[$prefix.'typeHint']) && $c->allowsNull() && !class_exists('ReflectionNamedType', false)) {
|
||||
$a[$prefix.'default'] = null;
|
||||
unset($a[$prefix.'allowsNull']);
|
||||
}
|
||||
}
|
||||
|
||||
return $a;
|
||||
|
@@ -25,7 +25,7 @@ class TraceStub extends Stub
|
||||
public $sliceLength;
|
||||
public $numberingOffset;
|
||||
|
||||
public function __construct(array $trace, $keepArgs = true, $sliceOffset = 0, $sliceLength = null, $numberingOffset = 0)
|
||||
public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0)
|
||||
{
|
||||
$this->value = $trace;
|
||||
$this->keepArgs = $keepArgs;
|
||||
|
Reference in New Issue
Block a user