protected function invokeStep(Step $step, Bootstrap $bootstrap)
    {
        $identifier = $step->getIdentifier();
        try {
            $step($bootstrap);
        } catch (\Throwable $e) {
            throw new StepFailedException($step, $e);
        }
        if (isset($this->steps[$identifier])) {
            foreach ($this->steps[$identifier] as $followingStep) {
                $this->invokeStep($followingStep, $bootstrap);
            }
        }
    }