bug #10363 [FrameworkBundle][Console] Fix issue #10345 container:debug --parameter="" not working anymore (FineWolf)

This PR was merged into the 2.4 branch.

Discussion
----------

[FrameworkBundle][Console] Fix issue #10345 container:debug --parameter="" not working anymore

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes*
| Fixed tickets | #10345
| License       | MIT
| Doc PR        | N/A

## TODO
- [x] Fix issue #10345
- [ ] Create unit test for `describeContainerParameter`

Commits
-------

b278aa4 Fix issue symfony/symfony#10345 '[FrameworkBundle][Console] container:debug --parameter="" not working anymore'
This commit is contained in:
Fabien Potencier 2014-03-26 18:53:45 +01:00
commit 69fa1da19e

View File

@ -55,7 +55,7 @@ abstract class Descriptor implements DescriptorInterface
$this->describeContainerService($this->resolveServiceDefinition($object, $options['id']), $options);
break;
case $object instanceof ContainerBuilder && isset($options['parameter']):
$this->formatParameter($object->getParameter($options['parameter']));
$this->describeContainerParameter($object->getParameter($options['parameter']), $options);
break;
case $object instanceof ContainerBuilder:
$this->describeContainerServices($object, $options);
@ -114,6 +114,17 @@ abstract class Descriptor implements DescriptorInterface
*/
abstract protected function describeRoute(Route $route, array $options = array());
/**
* Describes a specific container parameter.
*
* @param mixed $parameterValue
* @param array $options
*/
protected function describeContainerParameter($parameterValue, array $options = array())
{
$this->write($this->formatParameter($parameterValue));
}
/**
* Describes container parameters.
*