[WebBundle] made the exception handler available by default in all environments
This commit is contained in:
parent
037dfca003
commit
1cbed102d4
@ -154,11 +154,6 @@ class WebExtension extends LoaderExtension
|
||||
$loader = new XmlFileLoader(__DIR__.'/../Resources/config');
|
||||
$configuration->merge($loader->load($this->resources['debug']));
|
||||
|
||||
if (isset($config['exception']) && $config['exception'])
|
||||
{
|
||||
$configuration->merge($loader->load('debug_exception_handler.xml'));
|
||||
}
|
||||
|
||||
if (isset($config['toolbar']) && $config['toolbar'])
|
||||
{
|
||||
$configuration->merge($loader->load('debug_data_collector.xml'));
|
||||
|
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://www.symfony-project.org/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<parameters>
|
||||
<parameter key="debug.exception_handler.class">Symfony\Framework\WebBundle\Listener\ExceptionHandler</parameter>
|
||||
<parameter key="debug.exception_handler.bundle">WebBundle</parameter>
|
||||
<parameter key="debug.exception_handler.controller">Exception</parameter>
|
||||
<parameter key="debug.exception_handler.action">exception</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="debug.exception_handler" class="%debug.exception_handler.class%">
|
||||
<annotation name="kernel.listener" event="core.exception" method="handle" />
|
||||
<argument type="service" id="service_container" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
<argument>%debug.exception_handler.bundle%</argument>
|
||||
<argument>%debug.exception_handler.controller%</argument>
|
||||
<argument>%debug.exception_handler.action%</argument>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
@ -9,6 +9,11 @@
|
||||
<parameter key="controller_loader.class">Symfony\Framework\WebBundle\Listener\ControllerLoader</parameter>
|
||||
<parameter key="router.class">Symfony\Components\Routing\Router</parameter>
|
||||
<parameter key="response_filter.class">Symfony\Framework\WebBundle\Listener\ResponseFilter</parameter>
|
||||
|
||||
<parameter key="exception_handler.class">Symfony\Framework\WebBundle\Listener\ExceptionHandler</parameter>
|
||||
<parameter key="exception_handler.bundle">WebBundle</parameter>
|
||||
<parameter key="exception_handler.controller">Exception</parameter>
|
||||
<parameter key="exception_handler.action">exception</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
@ -43,5 +48,14 @@
|
||||
<argument type="service" id="event_dispatcher" />
|
||||
<argument type="service" id="request" />
|
||||
</service>
|
||||
|
||||
<service id="exception_handler" class="%exception_handler.class%">
|
||||
<annotation name="kernel.listener" event="core.exception" method="handle" />
|
||||
<argument type="service" id="service_container" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
<argument>%exception_handler.bundle%</argument>
|
||||
<argument>%exception_handler.controller%</argument>
|
||||
<argument>%exception_handler.action%</argument>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
Reference in New Issue
Block a user