upgraded dependencies
This commit is contained in:
@@ -20,7 +20,7 @@ use Symfony\Component\VarDumper\Exception\ThrowingCasterException;
|
||||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
* @final
|
||||
*/
|
||||
class ExceptionCaster
|
||||
{
|
||||
@@ -46,17 +46,17 @@ class ExceptionCaster
|
||||
|
||||
private static $framesCache = [];
|
||||
|
||||
public static function castError(\Error $e, array $a, Stub $stub, $isNested, $filter = 0)
|
||||
public static function castError(\Error $e, array $a, Stub $stub, bool $isNested, int $filter = 0)
|
||||
{
|
||||
return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter);
|
||||
}
|
||||
|
||||
public static function castException(\Exception $e, array $a, Stub $stub, $isNested, $filter = 0)
|
||||
public static function castException(\Exception $e, array $a, Stub $stub, bool $isNested, int $filter = 0)
|
||||
{
|
||||
return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter);
|
||||
}
|
||||
|
||||
public static function castErrorException(\ErrorException $e, array $a, Stub $stub, $isNested)
|
||||
public static function castErrorException(\ErrorException $e, array $a, Stub $stub, bool $isNested)
|
||||
{
|
||||
if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) {
|
||||
$a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]);
|
||||
@@ -65,7 +65,7 @@ class ExceptionCaster
|
||||
return $a;
|
||||
}
|
||||
|
||||
public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, $isNested)
|
||||
public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, bool $isNested)
|
||||
{
|
||||
$trace = Caster::PREFIX_VIRTUAL.'trace';
|
||||
$prefix = Caster::PREFIX_PROTECTED;
|
||||
@@ -83,7 +83,7 @@ class ExceptionCaster
|
||||
return $a;
|
||||
}
|
||||
|
||||
public static function castSilencedErrorContext(SilencedErrorContext $e, array $a, Stub $stub, $isNested)
|
||||
public static function castSilencedErrorContext(SilencedErrorContext $e, array $a, Stub $stub, bool $isNested)
|
||||
{
|
||||
$sPrefix = "\0".SilencedErrorContext::class."\0";
|
||||
|
||||
@@ -110,7 +110,7 @@ class ExceptionCaster
|
||||
return $a;
|
||||
}
|
||||
|
||||
public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, $isNested)
|
||||
public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, bool $isNested)
|
||||
{
|
||||
if (!$isNested) {
|
||||
return $a;
|
||||
@@ -184,7 +184,7 @@ class ExceptionCaster
|
||||
return $a;
|
||||
}
|
||||
|
||||
public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, $isNested)
|
||||
public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, bool $isNested)
|
||||
{
|
||||
if (!$isNested) {
|
||||
return $a;
|
||||
@@ -212,7 +212,7 @@ class ExceptionCaster
|
||||
$ellipsisTail = $ellipsis->attr['ellipsis-tail'] ?? 0;
|
||||
$ellipsis = $ellipsis->attr['ellipsis'] ?? 0;
|
||||
|
||||
if (file_exists($f['file']) && 0 <= self::$srcContext) {
|
||||
if (is_file($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 = null;
|
||||
if (isset($f['object'])) {
|
||||
@@ -225,7 +225,7 @@ class ExceptionCaster
|
||||
$templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : '');
|
||||
$templateInfo = $template->getDebugInfo();
|
||||
if (isset($templateInfo[$f['line']])) {
|
||||
if (!method_exists($template, 'getSourceContext') || !file_exists($templatePath = $template->getSourceContext()->getPath())) {
|
||||
if (!method_exists($template, 'getSourceContext') || !is_file($templatePath = $template->getSourceContext()->getPath())) {
|
||||
$templatePath = null;
|
||||
}
|
||||
if ($templateSrc) {
|
||||
|
Reference in New Issue
Block a user