diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php index 02e2056a6d654..0535d269984d2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Application.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Application.php @@ -55,6 +55,16 @@ public function getKernel() return $this->kernel; } + /** + * {@inheritdoc} + */ + public function reset() + { + if ($this->kernel->getContainer()->has('services_resetter')) { + $this->kernel->getContainer()->get('services_resetter')->reset(); + } + } + /** * Runs the current application. * diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 44f5a536449d1..571ab7cb2f2ab 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -45,6 +45,7 @@ use Symfony\Component\ErrorCatcher\Exception\FatalThrowableError; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; +use Symfony\Contracts\Service\ResetInterface; /** * An Application is the container for a collection of commands. @@ -61,7 +62,7 @@ * * @author Fabien Potencier */ -class Application +class Application implements ResetInterface { private $commands = []; private $wantHelps = false; @@ -276,6 +277,13 @@ public function doRun(InputInterface $input, OutputInterface $output) return $exitCode; } + /** + * {@inheritdoc} + */ + public function reset() + { + } + public function setHelperSet(HelperSet $helperSet) { $this->helperSet = $helperSet; diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md index d9318635c4ba8..25c5a432b0c97 100644 --- a/src/Symfony/Component/Console/CHANGELOG.md +++ b/src/Symfony/Component/Console/CHANGELOG.md @@ -6,6 +6,7 @@ CHANGELOG * added `Question::setTrimmable` default to true to allow the answer to be trimmed * added method `preventRedrawFasterThan()` and `forceRedrawSlowerThan()` on `ProgressBar` + * `Application` implements `ResetInterface` 4.3.0 ----- @@ -38,7 +39,7 @@ CHANGELOG * `OutputFormatter` throws an exception when unknown options are used * removed `QuestionHelper::setInputStream()/getInputStream()` - * removed `Application::getTerminalWidth()/getTerminalHeight()` and + * removed `Application::getTerminalWidth()/getTerminalHeight()` and `Application::setTerminalDimensions()/getTerminalDimensions()` * removed `ConsoleExceptionEvent` * removed `ConsoleEvents::EXCEPTION` @@ -64,7 +65,7 @@ CHANGELOG with value optional explicitly passed empty * added console.error event to catch exceptions thrown by other listeners * deprecated console.exception event in favor of console.error -* added ability to handle `CommandNotFoundException` through the +* added ability to handle `CommandNotFoundException` through the `console.error` event * deprecated default validation in `SymfonyQuestionHelper::ask` @@ -80,7 +81,7 @@ CHANGELOG ----- * added truncate method to FormatterHelper - * added setColumnWidth(s) method to Table + * added setColumnWidth(s) method to Table 2.8.3 ----- pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy