Removed command headers, fixed naming

This commit is contained in:
William DURAND 2012-05-09 01:04:22 +02:00
commit 590787d2b6
12 changed files with 21 additions and 34 deletions

View file

@ -55,6 +55,11 @@ abstract class AbstractCommand extends ContainerAwareCommand
*/
protected $bundle = null;
/**
* @var Boolean
*/
private $alreadyWroteConnection = false;
/**
* Return the package prefix for a given bundle.
*
@ -436,8 +441,12 @@ EOT;
throw new \InvalidArgumentException(sprintf('Connection named %s doesn\'t exist', $name));
}
$output->writeln(sprintf('Use connection named <comment>%s</comment> in <comment>%s</comment> environment.',
$name, $this->getApplication()->getKernel()->getEnvironment()));
if (false === $this->alreadyWroteConnection) {
$output->writeln(sprintf('Use connection named <comment>%s</comment> in <comment>%s</comment> environment.',
$name, $this->getApplication()->getKernel()->getEnvironment())
);
$this->alreadyWroteConnection = true;
}
return array($name, $defaultConfig);
}