Skip to content

Commit 0b75bdb

Browse files
committed
renamed the ErrorHandler component to ErrorCatcher
1 parent 1a58873 commit 0b75bdb

File tree

5 files changed

+42
-44
lines changed

5 files changed

+42
-44
lines changed

Console/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Symfony\Component\Console\Output\OutputInterface;
2121
use Symfony\Component\Console\Style\SymfonyStyle;
2222
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
23-
use Symfony\Component\ErrorHandler\Exception\FatalThrowableError;
23+
use Symfony\Component\ErrorCatcher\Exception\FatalThrowableError;
2424
use Symfony\Component\HttpKernel\Bundle\Bundle;
2525
use Symfony\Component\HttpKernel\Kernel;
2626
use Symfony\Component\HttpKernel\KernelInterface;

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function load(array $configs, ContainerBuilder $container)
152152
$loader->load('web.xml');
153153
$loader->load('services.xml');
154154
$loader->load('fragment_renderer.xml');
155-
$loader->load('error_renderer.xml');
155+
$loader->load('error_catcher.xml');
156156

157157
$container->registerAliasForArgument('parameter_bag', PsrContainerInterface::class);
158158

FrameworkBundle.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
3333
use Symfony\Component\DependencyInjection\Compiler\RegisterReverseContainerPass;
3434
use Symfony\Component\DependencyInjection\ContainerBuilder;
35-
use Symfony\Component\ErrorHandler\DependencyInjection\ErrorHandlerPass;
36-
use Symfony\Component\ErrorHandler\ErrorHandler;
35+
use Symfony\Component\ErrorCatcher\DependencyInjection\ErrorCatcherPass;
36+
use Symfony\Component\ErrorCatcher\ErrorHandler;
3737
use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass;
3838
use Symfony\Component\Form\DependencyInjection\FormPass;
3939
use Symfony\Component\HttpFoundation\Request;
@@ -91,7 +91,7 @@ public function build(ContainerBuilder $container)
9191
KernelEvents::FINISH_REQUEST,
9292
];
9393

94-
$this->addCompilerPassIfExists($container, ErrorHandlerPass::class);
94+
$this->addCompilerPassIfExists($container, ErrorCatcherPass::class);
9595
$container->addCompilerPass(new LoggerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32);
9696
$container->addCompilerPass(new RegisterControllerArgumentLocatorsPass());
9797
$container->addCompilerPass(new RemoveEmptyControllerArgumentLocatorsPass(), PassConfig::TYPE_BEFORE_REMOVING);

Resources/config/error_catcher.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" ?>
2+
3+
<container xmlns="http://symfony.com/schema/dic/services"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
6+
7+
<services>
8+
<service id="error_catcher.error_renderer" class="Symfony\Component\ErrorCatcher\DependencyInjection\ErrorRenderer">
9+
<argument /> <!-- error renderer locator -->
10+
</service>
11+
12+
<service id="error_catcher.renderer.html" class="Symfony\Component\ErrorCatcher\ErrorRenderer\HtmlErrorRenderer">
13+
<tag name="error_catcher.renderer" />
14+
<argument>%kernel.debug%</argument>
15+
<argument>%kernel.charset%</argument>
16+
<argument>%debug.file_link_format%</argument>
17+
</service>
18+
19+
<service id="error_catcher.renderer.json" class="Symfony\Component\ErrorCatcher\ErrorRenderer\JsonErrorRenderer">
20+
<tag name="error_catcher.renderer" />
21+
<argument>%kernel.debug%</argument>
22+
</service>
23+
24+
<service id="error_catcher.renderer.xml" class="Symfony\Component\ErrorCatcher\ErrorRenderer\XmlErrorRenderer">
25+
<tag name="error_catcher.renderer" format="atom" />
26+
<tag name="error_catcher.renderer" />
27+
<argument>%kernel.debug%</argument>
28+
<argument>%kernel.charset%</argument>
29+
</service>
30+
31+
<service id="error_catcher.renderer.txt" class="Symfony\Component\ErrorCatcher\ErrorRenderer\TxtErrorRenderer">
32+
<tag name="error_catcher.renderer" />
33+
<argument>%kernel.debug%</argument>
34+
<argument>%kernel.charset%</argument>
35+
</service>
36+
</services>
37+
</container>

Resources/config/error_renderer.xml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)