Skip to content

Commit 0a34d29

Browse files
author
vasily
committed
fix setMethodCalls DI
1 parent ad1d529 commit 0a34d29

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/phpstan.neon
33
/phpunit.xml
44
/vendor
5+
.idea

DependencyInjection/CraueFormFlowExtension.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@ public function load(array $config, ContainerBuilder $container) {
3636
* {@inheritDoc}
3737
*/
3838
public function process(ContainerBuilder $container) {
39-
$baseFlowDefinitionMethodCalls = $container->getDefinition('craue.form.flow')->getMethodCalls();
40-
41-
foreach (array_keys($container->findTaggedServiceIds(self::FORM_FLOW_TAG)) as $id) {
42-
$container->findDefinition($id)->setMethodCalls($baseFlowDefinitionMethodCalls);
43-
}
39+
$baseFlowDefinitionMethodCalls = $container->getDefinition('craue.form.flow')->getMethodCalls();
40+
41+
foreach (array_keys($container->findTaggedServiceIds(self::FORM_FLOW_TAG)) as $id) {
42+
$def = $container->findDefinition($id);
43+
foreach ($baseFlowDefinitionMethodCalls as $call) {
44+
$def->addMethodCall($call[0], $call[1], $call[2] ?? false);
45+
}
46+
}
4447
}
4548

4649
}

0 commit comments

Comments
 (0)