Skip to content

Commit f7961bb

Browse files
committed
improve message when workflows are missing
1 parent bbaef6a commit f7961bb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,10 @@ private function registerWorkflowConfiguration(array $workflows, ContainerBuilde
397397
return;
398398
}
399399

400+
if (!class_exists(Workflow\Workflow::class)) {
401+
throw new LogicException('Workflow support cannot be enabled as the Workflow component is not installed.');
402+
}
403+
400404
$loader->load('workflow.xml');
401405

402406
$registryDefinition = $container->getDefinition('workflow.registry');

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"symfony/translation": "~3.2",
5151
"symfony/templating": "~2.8|~3.0",
5252
"symfony/validator": "~3.2",
53+
"symfony/workflow": "~3.2",
5354
"symfony/yaml": "~3.2",
5455
"symfony/property-info": "~3.1",
5556
"doctrine/annotations": "~1.0",

0 commit comments

Comments
 (0)