8000 [DependencyInjection] Do not preload functions: add "never" as symbol… · symfony/symfony@cfb6b07 · GitHub
[go: up one dir, main page]

Skip to content

Commit cfb6b07

Browse files
committed
[DependencyInjection] Do not preload functions: add "never" as symbol that should not be preloaded.
1 parent 88e4538 commit cfb6b07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ class %s extends {$options['class']}
353353
EOF;
354354

355355
foreach ($this->preload as $class) {
356-
if (!$class || str_contains($class, '$') || \in_array($class, ['int', 'float', 'string', 'bool', 'resource', 'object', 'array', 'null', 'callable', 'iterable', 'mixed', 'void'], true) || \function_exists($class)) {
356+
if (!$class || str_contains($class, '$') || \in_array($class, ['int', 'float', 'string', 'bool', 'resource', 'object', 'array', 'null', 'callable', 'iterable', 'mixed', 'void', 'never'], true) || \function_exists($class)) {
357357
continue;
358358
}
359359
if (!(class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false)) || (new \ReflectionClass($class))->isUserDefined()) {

0 commit comments

Comments
 (0)
0