Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 582e94f

Browse files
committed
feature #33053 [ErrorHandler] Rework fatal errors (fancyweb)
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Rework fatal errors | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#32605 | License | MIT | Doc PR | - Built on top of symfony/symfony#33038 so review only the second commit : symfony/symfony@d5c3f7e The goals of this PR is to replace current "fatal error handlers" with "error enhancers" since all our current fatal error handlers works on \Error since PHP7. That means we won't use the FatalErrorException anymore, so we will be able to remove it (once we don't need it in the rest of the codebase). The final goal btw is to handle \Throwable everywhere in the code so we can remove FatalThrowableError & FatalErrorException classes. Commits ------- aaa0cdf523 [ErrorHandler] Rework fatal error handlers
2 parents b8ad9b2 + 35906cf commit 582e94f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Console/Application.php

Lines changed: 2 additions & 2 deletions
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\ErrorHandler\Exception\ErrorException;
2424
use Symfony\Component\HttpKernel\Bundle\Bundle;
2525
use Symfony\Component\HttpKernel\Kernel;
2626
use Symfony\Component\HttpKernel\KernelInterface;
@@ -208,7 +208,7 @@ private function renderRegistrationErrors(InputInterface $input, OutputInterface
208208

209209
foreach ($this->registrationErrors as $error) {
210210
if (!$error instanceof \Exception) {
211-
$error = new FatalThrowableError($error);
211+
$error = new ErrorException($error);
212212
}
213213

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

0 commit comments

Comments
 (0)