<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <defaults public="false" />

        <service id="web_profiler.controller.profiler" class="Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController" public="true">
            <argument type="service" id="router" on-invalid="null" />
            <argument type="service" id="profiler" on-invalid="null" />
            <argument type="service" id="twig" />
            <argument>%data_collector.templates%</argument>
            <argument>%web_profiler.debug_toolbar.position%</argument>
            <argument type="service" id="web_profiler.csp.handler" />
            <argument>%kernel.project_dir%</argument>
        </service>

        <service id="web_profiler.controller.router" class="Symfony\Bundle\WebProfilerBundle\Controller\RouterController" public="true">
            <argument type="service" id="profiler" on-invalid="null" />
            <argument type="service" id="twig" />
            <argument type="service" id="router" on-invalid="null" />
        </service>

        <service id="web_profiler.controller.exception" class="Symfony\Bundle\WebProfilerBundle\Controller\ExceptionController" public="true">
            <argument type="service" id="profiler" on-invalid="null" />
            <argument type="service" id="twig" />
            <argument>%kernel.debug%</argument>
            <argument type="service" id="debug.file_link_formatter" />
        </service>

        <service id="web_profiler.csp.handler" class="Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler">
            <argument type="service">
                <service class="Symfony\Bundle\WebProfilerBundle\Csp\NonceGenerator" />
            </argument>
        </service>

        <service id="twig.extension.webprofiler" class="Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension">
            <tag name="twig.extension" />
            <argument type="service">
                <service class="Symfony\Component\VarDumper\Dumper\HtmlDumper">
                    <argument>null</argument>
                    <argument>%kernel.charset%</argument>
                    <argument type="constant">Symfony\Component\VarDumper\Dumper\HtmlDumper::DUMP_LIGHT_ARRAY</argument>
                    <call method="setDisplayOptions">
                        <argument type="collection">
                            <argument key="maxStringLength">4096</argument>
                            <argument key="fileLinkFormat" type="service" id="debug.file_link_formatter"></argument>
                        </argument>
                    </call>
                </service>
            </argument>
        </service>

        <service id="debug.file_link_formatter" class="Symfony\Component\HttpKernel\Debug\FileLinkFormatter">
            <argument>%debug.file_link_format%</argument>
            <argument type="service" id="request_stack" on-invalid="ignore" />
            <argument>%kernel.project_dir%</argument>
            <argument>/_profiler/open?file=%%f&amp;line=%%l#line%%l</argument>
        </service>

        <service id="debug.file_link_formatter.url_format" class="string">
            <factory class="Symfony\Component\HttpKernel\Debug\FileLinkFormatter" method="generateUrlFormat" />
            <argument type="service" id="router" />
            <argument>_profiler_open_file</argument>
            <argument>?file=%%f&amp;line=%%l#line%%l</argument>
        </service>
    </services>
</container>
