-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Console] Added Application::reset() #32418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <fabien@symfony.com> | ||
*/ | ||
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() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the point of an empty reset method? why not implement reset only in the frameworkbundle application? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Command::getApplication() returns this very class according to the phpdoc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, please, please, stop with the phpstan mania. We don't care if phpstan is happy or not. This is just a tool. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually I did it to make @nicolas-grekas happy (see previouses comment) he is not a tools 😅😁 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason @Tobion is that this method is now part of the semantics of the API exposed by the base There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. template pattern does not apply here. template pattern methods must either be abstract (to force subclasses to implement them) or function as helper method hooks (with can have an empty body). neither is the case here. it's just an empty method providing no functionality. but it's not that important to me. |
||
{ | ||
} | ||
|
||
public function setHelperSet(HelperSet $helperSet) | ||
{ | ||
$this->helperSet = $helperSet; | ||
|
Uh oh!
There was an error while loading. Please reload this page.