You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #48457 [FrameworkBundle] Improve UX ConfigDebugCommand has not yaml component (alamirault)
This PR was squashed before being merged into the 6.3 branch.
Discussion
----------
[FrameworkBundle] Improve UX ConfigDebugCommand has not yaml component
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#48429
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Throw exception in order to improve UX when Yaml component is missing
Message is inspired by https://github.com/symfony/symfony/blob/043257f6fc1fceb28bc0c37c59f2bea4d9c8d79d/src/Symfony/Component/Serializer/Encoder/YamlEncoder.php#L56
Commits
-------
b20fce5 [FrameworkBundle] Improve UX ConfigDebugCommand has not yaml component
if ('yaml' === $format && !class_exists(Yaml::class)) {
108
+
$errorIo->error('Setting the "format" option to "yaml" requires the Symfony Yaml component. Try running "composer install symfony/yaml" or use "--format=json" instead.');
109
+
110
+
return1;
111
+
}
112
+
95
113
if (null === $path = $input->getArgument('path')) {
96
114
$io->title(
97
115
sprintf('Current configuration for %s', $name === $extensionAlias ? sprintf('extension with alias "%s"', $extensionAlias) : sprintf('"%s"', $name))
0 commit comments