From 489a38dd4a5237932d5296950d2d596d178ed4da Mon Sep 17 00:00:00 2001 From: Jean Pasqualini Date: Thu, 23 Aug 2018 20:12:49 +0200 Subject: [PATCH] fix/finalize: do not resolve dynamic value on finalize --- src/ProcessBundle/Runner/StepRunner.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ProcessBundle/Runner/StepRunner.php b/src/ProcessBundle/Runner/StepRunner.php index 0135291..c01ef47 100644 --- a/src/ProcessBundle/Runner/StepRunner.php +++ b/src/ProcessBundle/Runner/StepRunner.php @@ -129,7 +129,7 @@ public function finalizeStep(ProcessState $processState, ConfigurationStep $step $processState->markSuccess(); $service = $this->registry->resolveService($step->getService()); - $this->configureOptions($service, $step, $processState); + $this->configureOptionsWithoutResolve($service, $step, $processState); $service->finalize($processState); if (ProcessState::RESULT_OK !== $processState->getResult()) { @@ -175,6 +175,13 @@ protected function configureOptions(StepInterface $service, ConfigurationStep $s ); } + protected function configureOptionsWithoutResolve(StepInterface $service, ConfigurationStep $step, ProcessState $processState): ProcessState + { + return $processState->setOptions( + $service->configureOptionResolver(new OptionsResolver())->resolve($step->getOptions()) + ); + } + protected function runStep(ProcessState $processState, ConfigurationStep $step): int { $processState->markSuccess();