Skip to content

Commit a1f3191

Browse files
committed
Merge branch '2.2' into 2.3
* 2.2: Throw exception if value is passed to VALUE_NONE input, long syntax fixed date type format pattern regex [FrameworkBundle] tweaked previous merge (refs #8242) do not re-register commands each time a Console\Application is run [Process] moved env check to the Process class (refs #8227) fix issue where $_ENV contains array vals [DomCrawler] Fix handling file:// without a host [Form] corrected interface bind() method defined against in deprecation notice [Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol Conflicts: src/Symfony/Component/Console/Tests/Input/ArgvInputTest.php src/Symfony/Component/DomCrawler/Link.php src/Symfony/Component/Form/Form.php
2 parents 6710863 + 845740c commit a1f3191

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Console/Application.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
class Application extends BaseApplication
2828
{
2929
private $kernel;
30+
private $commandsRegistered = false;
3031

3132
/**
3233
* Constructor.
@@ -65,7 +66,11 @@ public function getKernel()
6566
*/
6667
public function doRun(InputInterface $input, OutputInterface $output)
6768
{
68-
$this->registerCommands();
69+
if (!$this->commandsRegistered) {
70+
$this->registerCommands();
71+
72+
$this->commandsRegistered = true;
73+
}
6974

7075
$this->setDispatcher($this->kernel->getContainer()->get('event_dispatcher'));
7176

0 commit comments

Comments
 (0)