8000 Remove code that deals with legacy behavior of PHP_Incomplete_Class · symfony/symfony@c5a4f7d · GitHub
[go: up one dir, main page]

Skip to content

Commit c5a4f7d

Browse files
Remove code that deals with legacy behavior of PHP_Incomplete_Class
1 parent d065920 commit c5a4f7d

File tree

4 files changed

+2
-4
lines changed
  • VarExporter
  • 4 files changed

    +2
    -4
    lines changed

    src/Symfony/Component/ErrorHandler/Exception/FlattenException.php

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -359,7 +359,6 @@ private function flattenArgs(array $args, int $level = 0, int &$count = 0): arra
    359359
    return ['array', '*SKIPPED over 10000 entries*'];
    360360
    }
    361361
    if ($value instanceof \__PHP_Incomplete_Class) {
    362-
    // is_object() returns false on PHP<=7.1
    363362
    $result[$key] = ['incomplete-object', $this->getClassNameFromIncomplete($value)];
    364363
    } elseif (\is_object($value)) {
    365364
    $result[$key] = ['object', \get_class($value)];

    src/Symfony/Component/VarDumper/Cloner/VarCloner.php

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -166,7 +166,6 @@ protected function doClone($var)
    166166
    break;
    167167

    168168
    case \is_object($v):
    169-
    case $v instanceof \__PHP_Incomplete_Class:
    170169
    if (empty($objRefs[$h = spl_object_id($v)])) {
    171170
    $stub = new Stub();
    172171
    $stub->type = Stub::TYPE_OBJECT;

    src/Symfony/Component/VarExporter/Internal/Exporter.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -60,7 +60,7 @@ public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount
    6060
    $value = self::prepare($value, $objectsPool, $refsPool, $objectsCount, $valueIsStatic);
    6161
    }
    6262
    goto handle_value;
    63-
    } elseif (!\is_object($value) && !$value instanceof \__PHP_Incomplete_Class || $value instanceof \UnitEnum) {
    63+
    } elseif (!\is_object($value) || $value instanceof \UnitEnum) {
    6464
    goto handle_value;
    6565
    }
    6666

    src/Symfony/Component/VarExporter/VarExporter.php

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -44,7 +44,7 @@ public static function export($value, bool &$isStaticValue = null, array &$found
    4444
    {
    4545
    $isStaticValue = true;
    4646

    47-
    if (!\is_object($value) && !(\is_array($value) && $value) && !$value instanceof \__PHP_Incomplete_Class && !\is_resource($value) || $value instanceof \UnitEnum) {
    47+
    if (!\is_object($value) && !(\is_array($value) && $value) && !\is_resource($value) || $value instanceof \UnitEnum) {
    4848
    return Exporter::export($value);
    4949
    }
    5050

    0 commit comments

    Comments
     (0)
    0