<commit_before><?php
declare(strict_types=1);

namespace DiContainerBenchmarks\Container\Symfony;

use DiContainerBenchmarks\Container\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;

class SymfonyContainer implements ContainerInterface
{
    public function getName(): string
    {
        return "Symfony";
    }

    public function isCompiled(): bool
    {
        return true;
    }

    public function isAutowiringSupported(): bool
    {
        return true;
    }

    public function getUrl(): string
    {
        return "https://symfony.com/doc/3.2/components/dependency_injection.html";
    }

    public function build(): void
    {
        // Build container with prototype services
        $containerBuilder = new ContainerBuilder();

        for ($i = 1; $i <= 100; $i++) {
            $definition = new Definition('DiContainerBenchmarks\Fixture\Class' . $i, []);
            $definition->setShared(false);
            $definition->setAutowired(true);
            $containerBuilder->setDefinition('DiContainerBenchmarks\Fixture\Class' . $i, $definition);
        }

        $containerBuilder->compile();

        $dumper = new PhpDumper($containerBuilder);
        file_put_contents(
            "/code/src/Container/Symfony/Resource/CompiledPrototypeContainer.php",
            $dumper->dump(
                [
                    "namespace" => "DiContainerBenchmarks\\Container\\Symfony\\Resource",
                    "class" => "CompiledPrototypeContainer"
                ]
            )
        );

        // Build container with singleton services
        $containerBuilder = new ContainerBuilder();

        for ($i = 1; $i <= 100; $i++) {
            $definition = new Definition('DiContainerBenchmarks\Fixture\Class' . $i, []);
            $definition->setShared(true);
            $definition->setAutowired(true);
            $containerBuilder->setDefinition('DiContainerBenchmarks\Fixture\Class' . $i, $definition);
        }

        $containerBuilder->compile();

        $dumper = new PhpDumper($containerBuilder);
        file_put_contents(
            "/code/src/Container/Symfony/Resource/CompiledSingletonContainer.php",
            $dumper->dump(
                [
                    "namespace" => "DiContainerBenchmarks\\Container\\Symfony\\Resource",
                    "class" => "CompiledSingletonContainer"
                ]
            )
        );
    }
}<commit_msg>Disable the debug mode of the Symfony dumper<commit_after><?php
declare(strict_types=1);

namespace DiContainerBenchmarks\Container\Symfony;

use DiContainerBenchmarks\Container\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;

class SymfonyContainer implements ContainerInterface
{
    public function getName(): string
    {
        return "Symfony";
    }

    public function isCompiled(): bool
    {
        return true;
    }

    public function isAutowiringSupported(): bool
    {
        return true;
    }

    public function getUrl(): string
    {
        return "https://symfony.com/doc/3.2/components/dependency_injection.html";
    }

    public function build(): void
    {
        // Build container with prototype services
        $containerBuilder = new ContainerBuilder();

        for ($i = 1; $i <= 100; $i++) {
            $definition = new Definition('DiContainerBenchmarks\Fixture\Class' . $i, []);
            $definition->setShared(false);
            $definition->setAutowired(true);
            $containerBuilder->setDefinition('DiContainerBenchmarks\Fixture\Class' . $i, $definition);
        }

        $containerBuilder->compile();

        $dumper = new PhpDumper($containerBuilder);
        file_put_contents(
            "/code/src/Container/Symfony/Resource/CompiledPrototypeContainer.php",
            $dumper->dump(
                [
                    "namespace" => "DiContainerBenchmarks\\Container\\Symfony\\Resource",
                    "class" => "CompiledPrototypeContainer",
                    "debug" => false,
                ]
            )
        );

        // Build container with singleton services
        $containerBuilder = new ContainerBuilder();

        for ($i = 1; $i <= 100; $i++) {
            $definition = new Definition('DiContainerBenchmarks\Fixture\Class' . $i, []);
            $definition->setShared(true);
            $definition->setAutowired(true);
            $containerBuilder->setDefinition('DiContainerBenchmarks\Fixture\Class' . $i, $definition);
        }

        $containerBuilder->compile();

        $dumper = new PhpDumper($containerBuilder);
        file_put_contents(
            "/code/src/Container/Symfony/Resource/CompiledSingletonContainer.php",
            $dumper->dump(
                [
                    "namespace" => "DiContainerBenchmarks\\Container\\Symfony\\Resource",
                    "class" => "CompiledSingletonContainer",
                    "debug" => false,
                ]
            )
        );
    }
}
{'fraction_non_alphanumeric': 0.1158478302427834, 'fraction_numerical': 0.004205696807493787, 'mean_word_length': 2.2496894409937886, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 33, 'https://': 2, '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': '2390193', 'n_tokens_mistral': 1388, 'n_tokens_neox': 1338, 'n_words': 235}