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

Skip to content

Commit 554ab9f

Browse files
committed
[Console] renamed ConsoleForExceptionEvent into ConsoleExceptionEvent
1 parent 395ec40 commit 554ab9f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
use Symfony\Component\Console\Helper\ProgressHelper;
3232
use Symfony\Component\Console\Helper\TableHelper;
3333
use Symfony\Component\Console\Event\ConsoleCommandEvent;
34-
use Symfony\Component\Console\Event\ConsoleForExceptionEvent;
34+
use Symfony\Component\Console\Event\ConsoleExceptionEvent;
3535
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
3636
use Symfony\Component\EventDispatcher\EventDispatcher;
3737

@@ -901,7 +901,7 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
901901
$event = new ConsoleTerminateEvent($command, $input, $output, $e->getCode());
902902
$this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event);
903903

904-
$event = new ConsoleForExceptionEvent($command, $input, $output, $e, $event->getExitCode());
904+
$event = new ConsoleExceptionEvent($command, $input, $output, $e, $event->getExitCode());
905905
$this->dispatcher->dispatch(ConsoleEvents::EXCEPTION, $event);
906906

907907
throw $event->getException();

src/Symfony/Component/Console/ConsoleEvents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ final class ConsoleEvents
4646
*
4747
* This event allows you to deal with the exception or
4848
* to modify the thrown exception. The event listener method receives
49-
* a Symfony\Component\Console\Event\ConsoleForExceptionEvent
49+
* a Symfony\Component\Console\Event\ConsoleExceptionEvent
5050
* instance.
5151
*
5252
* @var string

src/Symfony/Component/Console/Event/ConsoleForExceptionEvent.php renamed to src/Symfony/Component/Console/Event/ConsoleExceptionEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Fabien Potencier <[email protected]>
2222
*/
23-
class ConsoleForExceptionEvent extends ConsoleEvent
23+
class ConsoleExceptionEvent extends ConsoleEvent
2424
{
2525
private $exception;
2626
private $exitCode;

src/Symfony/Component/Console/Tests/ApplicationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
use Symfony\Component\Console\Output\OutputInterface;
2525
use Symfony\Component\Console\Tester\ApplicationTester;
2626
use Symfony\Component\Console\Event\ConsoleCommandEvent;
27-
use Symfony\Component\Console\Event\ConsoleForExceptionEvent;
27+
use Symfony\Component\Console\Event\ConsoleExceptionEvent;
2828
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
2929
use Symfony\Component\EventDispatcher\EventDispatcher;
3030

@@ -788,7 +788,7 @@ protected function getDispatcher()
788788

789789
$event->setExitCode(128);
790790
});
791-
$dispatcher->addListener('console.exception', function (ConsoleForExceptionEvent $event) {
791+
$dispatcher->addListener('console.exception', function (ConsoleExceptionEvent $event) {
792792
$event->getOutput()->writeln('caught.');
793793

794794
$event->setException(new \LogicException('caught.', $event->getExitCode(), $event->getException()));

0 commit comments

Comments
 (0)