10000 bug #27596 [Framework][Workflow] Added support for interfaces (vudalt… · symfony/symfony@50f2ed7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 50f2ed7

Browse files
committed
bug #27596 [Framework][Workflow] Added support for interfaces (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #27596). Discussion ---------- [Framework][Workflow] Added support for interfaces | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT I consider this to be a bugfix in config, because `ClassInstanceSupportStrategy` (`InstanceOfSupportStrategy`) actually works with interfaces. Therefore propose to 3.4. Commits ------- 6104c28 [Framework][Workflow] Added support for interfaces
2 parents be700ae + 6104c28 commit 50f2ed7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
329329
->prototype('scalar')
330330
->cannotBeEmpty()
331331
->validate()
332-
->ifTrue(function ($v) { return !class_exists($v); })
333-
->thenInvalid('The supported class %s does not exist.')
332+
->ifTrue(function ($v) { return !class_exists($v) && !interface_exists($v); })
333+
->thenInvalid('The supported class or interface "%s" does not exist.')
334334
->end()
335335
->end()
336336
->end()

0 commit comments

Comments
 (0)
0