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
@@ -364,7 +365,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode): void
364
365
->arrayNode('workflows', 'workflow')
365
366
->canBeEnabled()
366
367
->beforeNormalization()
367
-
->always(function ($v) {
368
+
->always(staticfunction ($v) {
368
369
if (\is_array($v) && true === $v['enabled']) {
369
370
$workflows = $v;
370
371
unset($workflows['enabled']);
@@ -478,15 +479,36 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode): void
478
479
->end()
479
480
->arrayNode('places', 'place')
480
481
->beforeNormalization()
481
-
->always()
482
-
->then(staticfunction ($places) {
483
-
if (!\is_array($places)) {
484
-
thrownewInvalidConfigurationException('The "places" option must be an array in workflow configuration.');
482
+
->always(staticfunction ($places) {
483
+
if (\is_string($places)) {
484
+
if (2 !== \count($places = explode('::', $places, 2))) {
485
+
thrownewInvalidConfigurationException('The "places" option must be a "FQCN::glob" pattern in workflow configuration.');
486
+
}
487
+
[$class, $pattern] = $places;
488
+
if (!class_exists($class) && !interface_exists($class, false)) {
489
+
thrownewInvalidConfigurationException(\sprintf('The "places" option must be a "FQCN::glob" pattern in workflow configuration, but class "%s" is not found.', $class));
0 commit comments