src/AppKernel.php
final public function configureContainer(ContainerBuilder $containerBuilder, LoaderInterface $loader)
    {
        $defaultConfig = [
            'templating' => [
                'engines' => ['twig'],
            ],
            'profiler' => [
                'only_exceptions' =>  false,
            ],
            'session' => [
                'handler_id' => 'session.handler.native_file',
                'save_path'  => $this->getVarDir() . '/sessions',
            ]
        ];

        $this->configLoader->loadDefaultConfiguration($containerBuilder, $defaultConfig);
        $this->configLoader->loadProjectParameters($loader);
        $this->configLoader->loadDefaultSecurity($loader);
        $this->configLoader->loadProjectConfig($loader);
        $this->configLoader->loadRequiredConfig($containerBuilder);

        /*/ configure WebProfilerBundle if it is enabled /*/
        if (isset($this->bundles['WebProfilerBundle'])) {
            $containerBuilder->loadFromExtension('web_profiler', array(
                'toolbar' => true,
                'intercept_redirects' => false,
            ));
        }
    }
final public function configureContainer(ContainerBuilder $containerBuilder, LoaderInterface $loader)
    {
        $defaultConfig = [
            'templating' => [
                'engines' => ['twig'],
            ],
            'profiler' => [
                'only_exceptions' =>  false,
            ],
            'session' => [
                'handler_id' => 'session.handler.native_file',
                'save_path'  => $this->getVarDir() . '/sessions',
            ]
        ];

        $this->configLoader->loadDefaultConfiguration($containerBuilder, $defaultConfig);
        $this->configLoader->loadProjectParameters($loader);
        $this->configLoader->loadDefaultSecurity($loader);
        $this->configLoader->loadProjectConfig($loader);
        $this->configLoader->loadRequiredConfig($containerBuilder);

        /*/ configure WebProfilerBundle if it is enabled /*/
        if (isset($this->bundles['WebProfilerBundle'])) {
            $containerBuilder->loadFromExtension('web_profiler', array(
                'toolbar' => true,
                'intercept_redirects' => false,
            ));
        }
    }
@param ContainerBuilder $containerBuilder
@param LoaderInterface $loader

@throws \LogicException
@throws \Exception