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
* 3.4:
[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
@@ -155,7 +155,7 @@ public function load(array $configs, ContainerBuilder $container)
155
155
// translator will be used and everything will still work as expected.
156
156
if ($this->isConfigEnabled($container, $config['translator']) || $this->isConfigEnabled($container, $config['form']) || $this->isConfigEnabled($container, $config['validation'])) {
157
157
if (!class_exists('Symfony\Component\Translation\Translator') && $this->isConfigEnabled($container, $config['translator'])) {
158
-
thrownewLogicException('Translation support cannot be enabled as the Translation component is not installed.');
158
+
thrownewLogicException('Translation support cannot be enabled as the Translation component is not installed. Try running "composer require symfony/translation".');
159
159
}
160
160
161
161
if (class_exists(Translator::class)) {
@@ -208,7 +208,7 @@ public function load(array $configs, ContainerBuilder $container)
208
208
209
209
if ($this->isConfigEnabled($container, $config['form'])) {
210
210
if (!class_exists('Symfony\Component\Form\Form')) {
211
-
thrownewLogicException('Form support cannot be enabled as the Form component is not installed.');
211
+
thrownewLogicException('Form support cannot be enabled as the Form component is not installed. Try running "composer require symfony/form".');
212
212
}
213
213
214
214
$this->formConfigEnabled = true;
@@ -228,15 +228,15 @@ public function load(array $configs, ContainerBuilder $container)
228
228
229
229
if ($this->isConfigEnabled($container, $config['assets'])) {
230
230
if (!class_exists('Symfony\Component\Asset\Package')) {
231
-
thrownewLogicException('Asset support cannot be enabled as the Asset component is not installed.');
231
+
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'])) {
238
238
if (!class_exists('Symfony\Component\Templating\PhpEngine')) {
239
-
thrownewLogicException('Templating support cannot be enabled as the Templating component is not installed.');
239
+
thrownewLogicException('Templating support cannot be enabled as the Templating component is not installed. Try running "composer require symfony/templating".');
@@ -264,7 +264,7 @@ public function load(array $configs, ContainerBuilder $container)
264
264
265
265
if ($this->isConfigEnabled($container, $config['serializer'])) {
266
266
if (!class_exists('Symfony\Component\Serializer\Serializer')) {
267
-
thrownewLogicException('Serializer support cannot be enabled as the Serializer component is not installed.');
267
+
thrownewLogicException('Serializer support cannot be enabled as the Serializer component is not installed. Try running "composer require symfony/serializer-pack".');
@@ -280,7 +280,7 @@ public function load(array $configs, ContainerBuilder $container)
280
280
281
281
if ($this->isConfigEnabled($container, $config['web_link'])) {
282
282
if (!class_exists(HttpHeaderSerializer::class)) {
283
-
thrownewLogicException('WebLink support cannot be enabled as the WebLink component is not installed.');
283
+
thrownewLogicException('WebLink support cannot be enabled as the WebLink component is not installed. Try running "composer require symfony/weblink".');
284
284
}
285
285
286
286
$loader->load('web_link.xml');
@@ -476,7 +476,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
476
476
}
477
477
478
478
if (!class_exists(Workflow\Workflow::class)) {
479
-
thrownewLogicException('Workflow support cannot be enabled as the Workflow component is not installed.');
479
+
thrownewLogicException('Workflow support cannot be enabled as the Workflow component is not installed. Try running "composer require symfony/workflow".');
480
480
}
481
481
482
482
$loader->load('workflow.xml');
@@ -607,11 +607,11 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
607
607
}
608
608
609
609
if (!class_exists(ExpressionLanguage::class)) {
610
-
thrownewLogicException('Cannot guard workflows as the ExpressionLanguage component is not installed.');
610
+
thrownewLogicException('Cannot guard workflows as the ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".');
611
611
}
612
612
613
613
if (!class_exists(Security::class)) {
614
-
thrownewLogicException('Cannot guard workflows as the Security component is not installed.');
614
+
thrownewLogicException('Cannot guard workflows as the Security component is not installed. Try running "composer require symfony/security".');
@@ -1043,7 +1043,7 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
1043
1043
}
1044
1044
1045
1045
if (!class_exists('Symfony\Component\Validator\Validation')) {
1046
-
thrownewLogicException('Validation support cannot be enabled as the Validator component is not installed.');
1046
+
thrownewLogicException('Validation support cannot be enabled as the Validator component is not installed. Try running "composer require symfony/validator".');
0 commit comments