<commit_before><?php

namespace Naldz\Bundle\DBPatcherBundle\DependencyInjection;

use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class DBPatcherExtension extends Extension
{
    /**
     * Loads the configuration.
     *
     * @param array            $configs   An array of configuration settings
     * @param ContainerBuilder $container A ContainerBuilder instance
     */
    public function load(array $configs, ContainerBuilder $container)
    {
        $processor = new Processor();
                
        $configuration = $this->getConfiguration($configs, $container);
        $config = $processor->processConfiguration($configuration, $configs);

        $container->setParameter('db_patcher.patch_dir', $config['patch_dir']);
        $container->setParameter('db_patcher.database_host', $config['database_host']);
        $container->setParameter('db_patcher.database_user', $config['database_host']);
        $container->setParameter('db_patcher.database_password', $config['database_host']);
        $container->setParameter('db_patcher.database_name', $config['database_host']);

    }
}<commit_msg>Fixed bug where all database parameters where all having the host parameter value.<commit_after><?php

namespace Naldz\Bundle\DBPatcherBundle\DependencyInjection;

use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class DBPatcherExtension extends Extension
{
    /**
     * Loads the configuration.
     *
     * @param array            $configs   An array of configuration settings
     * @param ContainerBuilder $container A ContainerBuilder instance
     */
    public function load(array $configs, ContainerBuilder $container)
    {
        $processor = new Processor();
                
        $configuration = $this->getConfiguration($configs, $container);
        $config = $processor->processConfiguration($configuration, $configs);

        $container->setParameter('db_patcher.patch_dir', $config['patch_dir']);
        $container->setParameter('db_patcher.database_host', $config['database_host']);
        $container->setParameter('db_patcher.database_user', $config['database_user']);
        $container->setParameter('db_patcher.database_password', $config['database_password']);
        $container->setParameter('db_patcher.database_name', $config['database_name']);

    }
}
{'fraction_non_alphanumeric': 0.11597032409215151, 'fraction_numerical': 0.0, 'mean_word_length': 4.271604938271605, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6707933', 'n_tokens_mistral': 653, 'n_tokens_neox': 641, 'n_words': 122}