8000 minor #51616 [DebugBundle] Remove obsolete VarDumper feature detectio… · symfony/symfony@fd75f35 · GitHub
[go: up one dir, main page]

Skip to content

Commit fd75f35

Browse files
committed
minor #51616 [DebugBundle] Remove obsolete VarDumper feature detection (derrabus)
This PR was merged into the 6.4 branch. Discussion ---------- [DebugBundle] Remove obsolete VarDumper feature detection | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A This PR removes detection for features introduced with #30301 (Symfony 4.3) and #27261 (Symfony 4.2). Commits ------- 9f9747c [DebugBundle] Remove obsolete VarDumper feature detection
2 parents cae4ccd + 9f9747c commit fd75f35

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