8000 [DebugBundle] Remove obsolete VarDumper feature detection · symfony/symfony@9f9747c · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f9747c

Browse files
committed
[DebugBundle] Remove obsolete VarDumper feature detection
1 parent fee9b30 commit 9f9747c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Symfony/Bundle/DebugBundle/DependencyInjection/DebugExtension.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,10 @@ public function load(array $configs, ContainerBuilder $container)
4343
$container->getDefinition('var_dumper.cloner')
4444
->addMethodCall('setMaxItems', [$config['max_items']])
4545
->addMethodCall('setMinDepth', [$config['min_depth']])
46-
->addMethodCall('setMaxString', [$config['max_string_length']]);
46+
->addMethodCall('setMaxString', [$config['max_string_length']])
47+
->addMethodCall('addCasters', [ReflectionCaster::UNSET_CLOSURE_FILE_INFO]);
4748

48-
if (method_exists(ReflectionCaster::class, 'unsetClosureFileInfo')) {
49-
$container->getDefinition('var_dumper.cloner')
50-
->addMethodCall('addCasters', [ReflectionCaster::UNSET_CLOSURE_FILE_INFO]);
51-
}
52-
53-
if (method_exists(HtmlDumper::class, 'setTheme') && 'dark' !== $config['theme']) {
49+
if ('dark' !== $config['theme']) {
5450
$container->getDefinition('var_dumper.html_dumper')
5551
->addMethodCall('setTheme', [$config['theme']]);
5652
}

0 commit comments

Comments
 (0)
0