private function fillFromHash(
        ParameterDefinitionCollectionInterface $definitionCollection,
        array $values,
        bool $doImport = false
    ): void {
        foreach ($definitionCollection->getParameterDefinitions() as $name => $definition) {
            $value = $definition->getDefaultValue();
            $parameterType = $definition->getType();

            if (array_key_exists($name, $values)) {
                $value = $doImport ?
                    $parameterType->import($definition, $values[$name]) :
                    $parameterType->fromHash($definition, $values[$name]);
            }

            $this->setParameterValue($name, $value);

            if ($definition instanceof CompoundParameterDefinition) {
                $this->fillFromHash($definition, $values, $doImport);
            }
        }
    }