File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
src/Symfony/Bundle/FrameworkBundle/DependencyInjection Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -258,13 +258,12 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
258
258
->end ()
259
259
->end ()
260
260
->validate ()
261
- ->always (function ($ v ) {
262
- if (isset ($ v ['type ' ]) && isset ($ v ['service ' ])) {
263
- throw new \InvalidArgumentException ('"type" and "service" could not be used together. ' );
264
- }
265
-
266
- return $ v ;
267
- })
261
+ ->ifTrue (function ($ v ) { return isset ($ v ['type ' ]) && isset ($ v ['service ' ]); })
262
+ ->thenInvalid ('"type" and "service" cannot be used together. ' )
263
+ ->end ()
264
+ ->validate ()
265
+ ->ifTrue (function ($ v ) { return isset ($ v ['arguments ' ]) && isset ($ v ['service ' ]); })
266
+ ->thenInvalid ('"arguments" and "service" cannot be used together. ' )
268
267
->end ()
269
268
->end ()
270
269
->arrayNode ('supports ' )
You can’t perform that action at this time.
0 commit comments