Skip to content

Commit

Permalink
Merge pull request #47 from jean-pasqualini/fix/finalize
Browse files Browse the repository at this point in the history
La résolution dynamique des options au niveau du finalize pose problème quand les donnée ne sont plus dans le pipe
  • Loading branch information
jean-pasqualini authored Sep 29, 2018
2 parents d9c7f50 + 489a38d commit aa86fbd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ProcessBundle/Runner/StepRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit aa86fbd

Please sign in to comment.