Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21043b2

Browse files
committed
Improve UX ConfigDebugCommand has not yaml component
1 parent aee9ea5 commit 21043b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@
3838
#[AsCommand(name: 'debug:config', description: 'Dump the current configuration for an extension')]
3939
class ConfigDebugCommand extends AbstractConfigCommand
4040
{
41+
public function __construct(string $name = null)
42+
{
43+
if (!class_exists(Yaml::class)) {
44+
throw new \RuntimeException('The ConfigDebugCommand class requires the "Yaml" component. Install "symfony/yaml" to use it.');
45+
}
46+
47+
parent::__construct($name);
48+
}
49+
4150
protected function configure()
4251
{
4352
$this

0 commit comments

Comments
 (0)