Skip to content

Commit af956e3

Browse files
committed
Merge branch '4.4'
* 4.4: [HttpKernel] make ExceptionEvent able to propagate any throwable [Security] Avoid unnecessary usage of Reflection Disallow symfony/contracts v2. minor add missing loop break [Security] Add migrating encoder configuration [Security] Fix defining multiple roles per access_control rule
2 parents 74760e1 + 55676e2 commit af956e3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Console/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
use Symfony\Component\Console\Output\ConsoleOutputInterface;
2020
use Symfony\Component\Console\Output\OutputInterface;
2121
use Symfony\Component\Console\Style\SymfonyStyle;
22+
use Symfony\Component\Debug\Exception\FatalThrowableError;
2223
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
23-
use Symfony\Component\ErrorHandler\Exception\ErrorException;
2424
use Symfony\Component\HttpKernel\Bundle\Bundle;
2525
use Symfony\Component\HttpKernel\Kernel;
2626
use Symfony\Component\HttpKernel\KernelInterface;
@@ -211,7 +211,7 @@ private function renderRegistrationErrors(InputInterface $input, OutputInterface
211211
$this->doRenderThrowable($error, $output);
212212
} else {
213213
if (!$error instanceof \Exception) {
214-
$error = new ErrorException($error);
214+
$error = new FatalThrowableError($error);
215215
}
216216

217217
$this->doRenderException($error, $output);

Resources/config/web.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<argument type="service" id="error_renderer" />
7676
</service>
7777

78-
<service id="exception_listener" class="Symfony\Component\HttpKernel\EventListener\ExceptionListener">
78+
<service id="exception_listener" class="Symfony\Component\HttpKernel\EventListener\ErrorListener">
7979
<tag name="kernel.event_subscriber" />
8080
<tag name="monolog.logger" channel="request" />
8181
<argument>%kernel.error_controller%</argument>

Tests/Kernel/ConcreteMicroKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ConcreteMicroKernel extends Kernel implements EventSubscriberInterface
3232

3333
public function onKernelException(ExceptionEvent $event)
3434
{
35-
if ($event->getException() instanceof Danger) {
35+
if ($event->getThrowable() instanceof Danger) {
3636
$event->setResponse(Response::create('It\'s dangerous to go alone. Take this ⚔'));
3737
}
3838
}

0 commit comments

Comments
 (0)