[FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash
This commit is contained in:
parent
f056b4ef5b
commit
890edf7c38
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor;
|
namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor;
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||||
use Symfony\Component\Console\Helper\Table;
|
use Symfony\Component\Console\Helper\Table;
|
||||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||||
use Symfony\Component\DependencyInjection\Alias;
|
use Symfony\Component\DependencyInjection\Alias;
|
||||||
@ -226,7 +227,8 @@ class TextDescriptor extends Descriptor
|
|||||||
$rawOutput = isset($options['raw_text']) && $options['raw_text'];
|
$rawOutput = isset($options['raw_text']) && $options['raw_text'];
|
||||||
foreach ($this->sortServiceIds($serviceIds) as $serviceId) {
|
foreach ($this->sortServiceIds($serviceIds) as $serviceId) {
|
||||||
$definition = $this->resolveServiceDefinition($builder, $serviceId);
|
$definition = $this->resolveServiceDefinition($builder, $serviceId);
|
||||||
$styledServiceId = $rawOutput ? $serviceId : sprintf('<fg=cyan>%s</fg=cyan>', $serviceId);
|
|
||||||
|
$styledServiceId = $rawOutput ? $serviceId : sprintf('<fg=cyan>%s</fg=cyan>', OutputFormatter::escape($serviceId));
|
||||||
if ($definition instanceof Definition) {
|
if ($definition instanceof Definition) {
|
||||||
if ($showTag) {
|
if ($showTag) {
|
||||||
foreach ($definition->getTag($showTag) as $key => $tag) {
|
foreach ($definition->getTag($showTag) as $key => $tag) {
|
||||||
|
Reference in New Issue
Block a user