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
* 4.1:
[FWBundle] Uniformize errors when a component is missing
Fixes 28816 Translation commands should not talk about the old app/ directory since 3.4
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ public function load(array $configs, ContainerBuilder $container)
161
161
// translator will be used and everything will still work as expected.
162
162
if ($this->isConfigEnabled($container, $config['translator']) || $this->isConfigEnabled($container, $config['form']) || $this->isConfigEnabled($container, $config['validation'])) {
163
163
if (!class_exists('Symfony\Component\Translation\Translator') && $this->isConfigEnabled($container, $config['translator'])) {
164
-
thrownewLogicException('Translation support cannot be enabled as the Translation component is not installed.');
164
+
thrownewLogicException('Translation support cannot be enabled as the Translation component is not installed. Try running "composer require symfony/translation".');
165
165
}
166
166
167
167
if (class_exists(Translator::class)) {
@@ -218,7 +218,7 @@ public function load(array $configs, ContainerBuilder $container)
218
218
219
219
if ($this->isConfigEnabled($container, $config['form'])) {
220
220
if (!class_exists('Symfony\Component\Form\Form')) {
221
-
thrownewLogicException('Form support cannot be enabled as the Form component is not installed.');
221
+
thrownewLogicException('Form support cannot be enabled as the Form component is not installed. Try running "composer require symfony/form".');
222
222
}
223
223
224
224
$this->formConfigEnabled = true;
@@ -238,15 +238,15 @@ public function load(array $configs, ContainerBuilder $container)
238
238
239
239
if ($this->isConfigEnabled($container, $config['assets'])) {
240
240
if (!class_exists('Symfony\Component\Asset\Package')) {
241
-
thrownewLogicException('Asset support cannot be enabled as the Asset component is not installed.');
241
+
thrownewLogicException('Asset support cannot be enabled as the Asset component is not installed. Try running "composer require symfony/asset".');
if ($this->isConfigEnabled($container, $config['templating'])) {
248
248
if (!class_exists('Symfony\Component\Templating\PhpEngine')) {
249
-
thrownewLogicException('Templating support cannot be enabled as the Templating component is not installed.');
249
+
thrownewLogicException('Templating support cannot be enabled as the Templating component is not installed. Try running "composer require symfony/templating".');
@@ -274,7 +274,7 @@ public function load(array $configs, ContainerBuilder $container)
274
274
275
275
if ($this->isConfigEnabled($container, $config['serializer'])) {
276
276
if (!class_exists('Symfony\Component\Serializer\Serializer')) {
277
-
thrownewLogicException('Serializer support cannot be enabled as the Serializer component is not installed.');
277
+
thrownewLogicException('Serializer support cannot be enabled as the Serializer component is not installed. Try running "composer require symfony/serializer-pack".');
@@ -290,7 +290,7 @@ public function load(array $configs, ContainerBuilder $container)
290
290
291
291
if ($this->isConfigEnabled($container, $config['web_link'])) {
292
292
if (!class_exists(HttpHeaderSerializer::class)) {
293
-
thrownewLogicException('WebLink support cannot be enabled as the WebLink component is not installed.');
293
+
thrownewLogicException('WebLink support cannot be enabled as the WebLink component is not installed. Try running "composer require symfony/weblink".');
294
294
}
295
295
296
296
$loader->load('web_link.xml');
@@ -497,7 +497,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
497
497
}
498
498
499
499
if (!class_exists(Workflow\Workflow::class)) {
500
-
thrownewLogicException('Workflow support cannot be enabled as the Workflow component is not installed.');
500
+
thrownewLogicException('Workflow support cannot be enabled as the Workflow component is not installed. Try running "composer require symfony/workflow".');
501
501
}
502
502
503
503
$loader->load('workflow.xml');
@@ -629,11 +629,11 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
629
629
}
630
630
631
631
if (!class_exists(ExpressionLanguage::class)) {
632
-
thrownewLogicException('Cannot guard workflows as the ExpressionLanguage component is not installed.');
632
+
thrownewLogicException('Cannot guard workflows as the ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".');
633
633
}
634
634
635
635
if (!class_exists(Security::class)) {
636
-
thrownewLogicException('Cannot guard workflows as the Security component is not installed.');
636
+
thrownewLogicException('Cannot guard workflows as the Security component is not installed. Try running "composer require symfony/security".');
@@ -1066,7 +1066,7 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
1066
1066
}
1067
1067
1068
1068
if (!class_exists('Symfony\Component\Validator\Validation')) {
1069
-
thrownewLogicException('Validation support cannot be enabled as the Validator component is not installed.');
1069
+
thrownewLogicException('Validation support cannot be enabled as the Validator component is not installed. Try running "composer require symfony/validator".');
0 commit comments