<commit_before><?php

namespace Yolo;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Yolo\DependencyInjection\YoloExtension;
use Yolo\Compiler\EventSubscriberPass;

class Factory
{
    public static function createContainer(array $parameters = [])
    {
        $container = new ContainerBuilder();
        $container->registerExtension(new YoloExtension());
        $container->loadFromExtension('yolo');

        $container->getParameterBag()->add($parameters);

        $container->getCompiler()->addPass(new EventSubscriberPass());
        $container->compile();

        return $container;
    }
}<commit_msg>Adjust factory to use ContainerBuilder::addCompilerPass()<commit_after><?php

namespace Yolo;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Yolo\DependencyInjection\YoloExtension;
use Yolo\Compiler\EventSubscriberPass;

class Factory
{
    public static function createContainer(array $parameters = [])
    {
        $container = new ContainerBuilder();
        $container->registerExtension(new YoloExtension());
        $container->loadFromExtension('yolo');

        $container->getParameterBag()->add($parameters);

        $container->addCompilerPass(new EventSubscriberPass());
        $container->compile();

        return $container;
    }
}
{'fraction_non_alphanumeric': 0.11990776325903152, 'fraction_numerical': 0.0, 'mean_word_length': 4.25, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, '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': '5070417', 'n_tokens_mistral': 335, 'n_tokens_neox': 329, 'n_words': 60}