<commit_before><?php

namespace Oro\Bundle\ChartBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

use Oro\Component\Config\Loader\CumulativeConfigLoader;
use Oro\Component\Config\Loader\YamlCumulativeFileLoader;

class OroChartExtension extends Extension
{
    /**
     * {@inheritdoc}
     */
    public function load(array $configs, ContainerBuilder $container)
    {
        $chartConfigs = array();

        $configLoader = new CumulativeConfigLoader(
            'oro_chart',
            new YamlCumulativeFileLoader('Resources/config/oro/chart.yml')
        );

        $resources = $configLoader->load($container);
        foreach ($resources as $resource) {
            $chartConfigs[] = $resource->data['oro_chart'];
        }

        foreach ($configs as $config) {
            $chartConfigs[] = $config;
        }

        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $chartConfigs);

        $container->getDefinition('oro_chart.config_provider')->replaceArgument(0, $config);
    }<commit_msg>BAP-3230: Add chart configuration - add missed loading of services.yml<commit_after><?php

namespace Oro\Bundle\ChartBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\Config\FileLocator;

use Oro\Component\Config\Loader\CumulativeConfigLoader;
use Oro\Component\Config\Loader\YamlCumulativeFileLoader;

class OroChartExtension extends Extension
{
    /**
     * {@inheritdoc}
     */
    public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yml');

        $chartConfigs = array();

        $configLoader = new CumulativeConfigLoader(
            'oro_chart',
            new YamlCumulativeFileLoader('Resources/config/oro/chart.yml')
        );

        $resources = $configLoader->load($container);
        foreach ($resources as $resource) {
            $chartConfigs[] = $resource->data['oro_chart'];
        }

        foreach ($configs as $config) {
            $chartConfigs[] = $config;
        }

        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $chartConfigs);

        $container->getDefinition('oro_chart.config_provider')->replaceArgument(0, $config);
    }
{'fraction_non_alphanumeric': 0.11766903249906611, 'fraction_numerical': 0.0022413149047441168, 'mean_word_length': 3.4559068219633944, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '2405219', 'n_tokens_mistral': 732, 'n_tokens_neox': 713, 'n_words': 124}