Skip to content

Commit

Permalink
Merge branch '5.2' into 5.3
Browse files Browse the repository at this point in the history
* 5.2:
  Fix incompatible implicit float-to-int conversions
  [Translation] Don't pass null to strtoupper()
  cs fix
  [String] Fix implicit float-to-int casts
  [DependencyInjection] Don't pass null to trim()
  Add return types to JsonSerializable implementations
  Fix Serializable deprecations triggered by token mocks
  Add missing security translations
  • Loading branch information
derrabus committed Jun 6, 2021
2 parents 032adc3 + 367c209 commit ec221d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dumper/PhpDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,9 @@ private function getClasses(Definition $definition, string $id): array
$classes[] = trim($tag['class'], '\\');
}

$classes[] = trim($definition->getClass(), '\\');
if ($class = $definition->getClass()) {
$classes[] = trim($class, '\\');
}
$factory = $definition->getFactory();

if (!\is_array($factory)) {
Expand All @@ -2241,6 +2243,6 @@ private function getClasses(Definition $definition, string $id): array
$definition = $factory[0];
}

return array_filter($classes);
return $classes;
}
}

0 comments on commit ec221d6

Please sign in to comment.