Skip to content

Commit

Permalink
Merge branch '2.8' into 3.0
Browse files Browse the repository at this point in the history
* 2.8:
  [Console] Fix wrong exceptions being thrown
  Add missing parenthesis in docblock description
  [FrameworkBundle] Remove duplicated code in ContainerDebugCommand
  • Loading branch information
fabpot committed Apr 28, 2016
2 parents fc50ad9 + fddf073 commit dd3e510
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,21 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$io = new SymfonyStyle($input, $output);
$this->validateInput($input);
$object = $this->getContainerBuilder();

if ($input->getOption('parameters')) {
$object = $this->getContainerBuilder()->getParameterBag();
$object = $object->getParameterBag();
$options = array();
} elseif ($parameter = $input->getOption('parameter')) {
$object = $this->getContainerBuilder();
$options = array('parameter' => $parameter);
} elseif ($input->getOption('tags')) {
$object = $this->getContainerBuilder();
$options = array('group_by' => 'tags', 'show_private' => $input->getOption('show-private'));
} elseif ($tag = $input->getOption('tag')) {
$object = $this->getContainerBuilder();
$options = array('tag' => $tag, 'show_private' => $input->getOption('show-private'));
} elseif ($name = $input->getArgument('name')) {
$object = $this->getContainerBuilder();
$name = $this->findProperServiceName($input, $io, $object, $name);
$options = array('id' => $name);
} else {
$object = $this->getContainerBuilder();
$options = array('show_private' => $input->getOption('show-private'));
}

Expand Down
10 changes: 6 additions & 4 deletions src/Symfony/Component/Console/Helper/ProgressIndicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\Console\Helper;

use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Output\OutputInterface;

/**
Expand Down Expand Up @@ -53,7 +55,7 @@ public function __construct(OutputInterface $output, $format = null, $indicatorC
$indicatorValues = array_values($indicatorValues);

if (2 > count($indicatorValues)) {
throw new \InvalidArgumentException('Must have at least 2 indicator value characters.');
throw new InvalidArgumentException('Must have at least 2 indicator value characters.');
}

$this->format = self::getFormatDefinition($format);
Expand Down Expand Up @@ -118,7 +120,7 @@ public function getCurrentValue()
public function start($message)
{
if ($this->started) {
throw new \LogicException('Progress indicator already started.');
throw new LogicException('Progress indicator already started.');
}

$this->message = $message;
Expand All @@ -137,7 +139,7 @@ public function start($message)
public function advance()
{
if (!$this->started) {
throw new \LogicException('Progress indicator has not yet been started.');
throw new LogicException('Progress indicator has not yet been started.');
}

if (!$this->output->isDecorated()) {
Expand All @@ -164,7 +166,7 @@ public function advance()
public function finish($message)
{
if (!$this->started) {
throw new \LogicException('Progress indicator has not yet been started.');
throw new LogicException('Progress indicator has not yet been started.');
}

$this->message = $message;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Helper/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function setColumnStyle($columnIndex, $name)
} elseif (isset(self::$styles[$name])) {
$this->columnStyles[$columnIndex] = self::$styles[$name];
} else {
throw new \InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
}

return $this;
Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Component/Routing/RouteCollectionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function setCondition($condition)

/**
* Sets a default value that will be added to all embedded routes (unless that
* default value is already set.
* default value is already set).
*
* @param string $key
* @param mixed $value
Expand All @@ -186,7 +186,7 @@ public function setDefault($key, $value)

/**
* Sets a requirement that will be added to all embedded routes (unless that
* requirement is already set.
* requirement is already set).
*
* @param string $key
* @param mixed $regex
Expand All @@ -202,7 +202,7 @@ public function setRequirement($key, $regex)

/**
* Sets an opiton that will be added to all embedded routes (unless that
* option is already set.
* option is already set).
*
* @param string $key
* @param mixed $value
Expand Down

0 comments on commit dd3e510

Please sign in to comment.