protected static function mergeCommandOptionsIntoConfiguration(Configuration $config, InputExtendedInterface $input)
    {
        $configurationMapping = [
            // Database credentials
            'database-host' => 'Database.Host',
            'database-user' => 'Database.Username',
            'database-pass' => 'Database.Password',
            'database-port' => 'Database.Port',
            'database-name' => 'Database.Name',
            // SSH settings
            'ssh-key'       => 'SSH.KeyFile',
        ];

        foreach ($configurationMapping as $optionName => $configName) {
            if ($input->isOptionSet($optionName) === true) {
                $config->setConfigurationValue($configName, $input->getOption($optionName));

            // If the value is not set / available, set this to nothing
            } elseif (!$config->getConfigurationValue($configName)) {
                $config->setConfigurationValue($configName, null);
            }
        }

        return $config;
    }