Skip to content

Commit 9bcb22f

Browse files
authored
Symfony 6 compatibility: Fix compiler pass resolving argument error (#159)
1 parent 006f6cb commit 9bcb22f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/CompilerPass/AddingTypesToAdjustmentClearerPass.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public function process(ContainerBuilder $container): void
1717

1818
// Getting the new list of adjustment types to clear
1919
$listOfAdjustmentsToClear = $clearerDefinition->getArgument(0);
20+
if (1 === preg_match('/^%(.*)%$/', $listOfAdjustmentsToClear, $matches)) {
21+
$listOfAdjustmentsToClear = $container->getParameter($matches[1]);
22+
}
2023
$listOfAdjustmentsToClear[] = CustomerOptionRecalculator::CUSTOMER_OPTION_ADJUSTMENT;
2124

2225
// Setting the new list as the new definition

0 commit comments

Comments
 (0)