From d209a4ebac1ae0ada638622e6d6d58e7a297a752 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 28 Sep 2015 22:43:22 +0200 Subject: [PATCH] Updated the styles of the container commands --- .../Command/ContainerDebugCommand.php | 15 +- .../Console/Descriptor/TextDescriptor.php | 159 +++++++++++------- .../Descriptor/AbstractDescriptorTest.php | 7 + .../Tests/Fixtures/Descriptor/alias_1.txt | 2 +- .../Tests/Fixtures/Descriptor/alias_2.txt | 2 +- .../Fixtures/Descriptor/builder_1_public.txt | 17 +- .../Descriptor/builder_1_services.txt | 19 ++- .../Fixtures/Descriptor/builder_1_tag1.txt | 13 +- .../Fixtures/Descriptor/builder_1_tags.txt | 16 +- .../Fixtures/Descriptor/definition_1.txt | 27 +-- .../Fixtures/Descriptor/definition_2.txt | 32 ++-- .../Descriptor/event_dispatcher_1_event1.txt | 12 +- .../Descriptor/event_dispatcher_1_events.txt | 22 +-- ...gacy_synchronized_service_definition_1.txt | 27 +-- ...gacy_synchronized_service_definition_2.txt | 32 ++-- .../Tests/Fixtures/Descriptor/parameter.txt | 6 +- .../Fixtures/Descriptor/parameters_1.txt | 17 +- .../Descriptor/route_collection_1.txt | 12 +- 18 files changed, 255 insertions(+), 182 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index b2d1b1d8c0..d3d453c26e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -16,10 +16,10 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; -use Symfony\Component\Console\Question\ChoiceQuestion; /** * A console command for retrieving information about services. @@ -94,8 +94,9 @@ EOF */ protected function execute(InputInterface $input, OutputInterface $output) { + $output = new SymfonyStyle($input, $output); if (false !== strpos($input->getFirstArgument(), ':d')) { - $output->writeln('The use of "container:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:container" instead.'); + $output->caution('The use of "container:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:container" instead.'); } $this->validateInput($input); @@ -124,10 +125,11 @@ EOF $helper = new DescriptorHelper(); $options['format'] = $input->getOption('format'); $options['raw_text'] = $input->getOption('raw'); + $options['output'] = $output; $helper->describe($output, $object, $options); if (!$input->getArgument('name') && $input->isInteractive()) { - $output->writeln('To search for a service, re-run this command with a search term. debug:container log'); + $output->comment('To search for a specific service, re-run this command with a search term. (e.g. debug:container log)'); } } @@ -186,7 +188,7 @@ EOF return $this->containerBuilder = $container; } - private function findProperServiceName(InputInterface $input, OutputInterface $output, ContainerBuilder $builder, $name) + private function findProperServiceName(InputInterface $input, SymfonyStyle $output, ContainerBuilder $builder, $name) { if ($builder->has($name) || !$input->isInteractive()) { return $name; @@ -197,10 +199,7 @@ EOF throw new \InvalidArgumentException(sprintf('No services found that match "%s".', $name)); } - $question = new ChoiceQuestion('Choose a number for more information on the service', $matchingServices); - $question->setErrorMessage('Service %s is invalid.'); - - return $this->getHelper('question')->ask($input, $output, $question); + return $output->choice('Select one of the following services to display its information', $matchingServices); } private function findServiceIdsContaining(ContainerBuilder $builder, $name) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 580d7eebd7..c72abc9f3f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -105,16 +105,15 @@ class TextDescriptor extends Descriptor */ protected function describeContainerParameters(ParameterBag $parameters, array $options = array()) { - $table = new Table($this->getOutput()); - $table->setStyle('compact'); - $table->setHeaders(array('Parameter', 'Value')); + $tableHeaders = array('Parameter', 'Value'); + $tableRows = array(); foreach ($this->sortParameters($parameters) as $parameter => $value) { - $table->addRow(array($parameter, $this->formatParameter($value))); + $tableRows[] = array($parameter, $this->formatParameter($value)); } - $this->writeText($this->formatSection('container', 'List of parameters')."\n", $options); - $table->render(); + $options['output']->title('Symfony Container Parameters'); + $options['output']->table($tableHeaders, $tableRows); } /** @@ -123,15 +122,17 @@ class TextDescriptor extends Descriptor protected function describeContainerTags(ContainerBuilder $builder, array $options = array()) { $showPrivate = isset($options['show_private']) && $options['show_private']; - $description = array($this->formatSection('container', 'Tagged services')); - foreach ($this->findDefinitionsByTag($builder, $showPrivate) as $tag => $definitions) { - $description[] = $this->formatSection('tag', $tag); - $description = array_merge($description, array_keys($definitions)); - $description[] = ''; + if ($showPrivate) { + $options['output']->title('Symfony Container Public and Private Tags'); + } else { + $options['output']->title('Symfony Container Public Tags'); } - $this->writeText(implode("\n", $description), $options); + foreach ($this->findDefinitionsByTag($builder, $showPrivate) as $tag => $definitions) { + $options['output']->section(sprintf('"%s" tag', $tag)); + $options['output']->listing(array_keys($definitions)); + } } /** @@ -148,11 +149,13 @@ class TextDescriptor extends Descriptor } elseif ($service instanceof Definition) { $this->describeContainerDefinition($service, $options); } else { - $description = $this->formatSection('container', sprintf('Information for service %s', $options['id'])) - ."\n".sprintf('Service Id %s', isset($options['id']) ? $options['id'] : '-') - ."\n".sprintf('Class %s', get_class($service)); - - $this->writeText($description, $options); + $options['output']->title(sprintf('Information for Service "%s"', $options['id'])); + $options['output']->table( + array('Service ID', 'Class'), + array( + array(isset($options['id']) ? $options['id'] : '-', get_class($service)), + ) + ); } } @@ -165,16 +168,16 @@ class TextDescriptor extends Descriptor $showTag = isset($options['tag']) ? $options['tag'] : null; if ($showPrivate) { - $label = 'Public and private services'; + $title = 'Symfony Container Public and Private Services'; } else { - $label = 'Public services'; + $title = 'Symfony Container Public Services'; } if ($showTag) { - $label .= ' with tag '.$options['tag'].''; + $title .= sprintf(' Tagged with "%s" Tag', $options['tag']); } - $this->writeText($this->formatSection('container', $label)."\n", $options); + $options['output']->title($title); $serviceIds = isset($options['tag']) && $options['tag'] ? array_keys($builder->findTaggedServiceIds($options['tag'])) : $builder->getServiceIds(); $maxTags = array(); @@ -206,10 +209,8 @@ class TextDescriptor extends Descriptor $tagsCount = count($maxTags); $tagsNames = array_keys($maxTags); - $table = new Table($this->getOutput()); - $table->setStyle('compact'); - $table->setHeaders(array_merge(array('Service ID'), $tagsNames, array('Class name'))); - + $tableHeaders = array_merge(array('Service ID'), $tagsNames, array('Class name')); + $tableRows = array(); foreach ($this->sortServiceIds($serviceIds) as $serviceId) { $definition = $this->resolveServiceDefinition($builder, $serviceId); if ($definition instanceof Definition) { @@ -220,24 +221,24 @@ class TextDescriptor extends Descriptor $tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : ''; } if (0 === $key) { - $table->addRow(array_merge(array($serviceId), $tagValues, array($definition->getClass()))); + $tableRows[] = array_merge(array($serviceId), $tagValues, array($definition->getClass())); } else { - $table->addRow(array_merge(array(' "'), $tagValues, array(''))); + $tableRows[] = array_merge(array(' "'), $tagValues, array('')); } } } else { - $table->addRow(array($serviceId, $definition->getClass())); + $tableRows[] = array($serviceId, $definition->getClass()); } } elseif ($definition instanceof Alias) { $alias = $definition; - $table->addRow(array_merge(array($serviceId, sprintf('alias for "%s"', $alias)), $tagsCount ? array_fill(0, $tagsCount, '') : array())); + $tableRows[] = array_merge(array($serviceId, sprintf('alias for "%s"', $alias)), $tagsCount ? array_fill(0, $tagsCount, '') : array()); } else { // we have no information (happens with "service_container") - $table->addRow(array_merge(array($serviceId, get_class($definition)), $tagsCount ? array_fill(0, $tagsCount, '') : array())); + $tableRows[] = array_merge(array($serviceId, get_class($definition)), $tagsCount ? array_fill(0, $tagsCount, '') : array()); } } - $table->render(); + $options['output']->table($tableHeaders, $tableRows); } /** @@ -245,71 +246,79 @@ class TextDescriptor extends Descriptor */ protected function describeContainerDefinition(Definition $definition, array $options = array()) { - $description = isset($options['id']) - ? array($this->formatSection('container', sprintf('Information for service %s', $options['id']))) - : array(); + if (isset($options['id'])) { + $options['output']->title(sprintf('Information for Service "%s"', $options['id'])); + } - $description[] = sprintf('Service Id %s', isset($options['id']) ? $options['id'] : '-'); - $description[] = sprintf('Class %s', $definition->getClass() ?: '-'); + $tableHeaders = array('Option', 'Value'); + + $tableRows[] = array('Service ID', isset($options['id']) ? $options['id'] : '-'); + $tableRows[] = array('Class', $definition->getClass() ?: '-'); $tags = $definition->getTags(); if (count($tags)) { - $description[] = 'Tags'; + $tagInformation = ''; foreach ($tags as $tagName => $tagData) { - foreach ($tagData as $parameters) { - $description[] = sprintf(' - %-30s (%s)', $tagName, implode(', ', array_map(function ($key, $value) { + foreach ($tagData as $tagParameters) { + $parameters = array_map(function ($key, $value) { return sprintf('%s: %s', $key, $value); - }, array_keys($parameters), array_values($parameters)))); + }, array_keys($tagParameters), array_values($tagParameters)); + $parameters = implode(', ', $parameters); + + if ('' === $parameters) { + $tagInformation .= sprintf('%s', $tagName); + } else { + $tagInformation .= sprintf('%s (%s)', $tagName, $parameters); + } } } } else { - $description[] = 'Tags -'; + $tagInformation = '-'; } + $tableRows[] = array('Tags', $tagInformation); + + $tableRows[] = array('Scope', $definition->getScope(false)); + $tableRows[] = array('Public', $definition->isPublic() ? 'yes' : 'no'); + $tableRows[] = array('Synthetic', $definition->isSynthetic() ? 'yes' : 'no'); + $tableRows[] = array('Lazy', $definition->isLazy() ? 'yes' : 'no'); - $description[] = sprintf('Scope %s', $definition->getScope(false)); - $description[] = sprintf('Public %s', $definition->isPublic() ? 'yes' : 'no'); - $description[] = sprintf('Synthetic %s', $definition->isSynthetic() ? 'yes' : 'no'); - $description[] = sprintf('Lazy %s', $definition->isLazy() ? 'yes' : 'no'); - if (method_exists($definition, 'isShared')) { - $description[] = sprintf('Shared %s', $definition->isShared() ? 'yes' : 'no'); - } if (method_exists($definition, 'isSynchronized')) { - $description[] = sprintf('Synchronized %s', $definition->isSynchronized(false) ? 'yes' : 'no'); + $tableRows[] = array('Synchronized', $definition->isSynchronized(false) ? 'yes' : 'no'); } - $description[] = sprintf('Abstract %s', $definition->isAbstract() ? 'yes' : 'no'); + $tableRows[] = array('Abstract', $definition->isAbstract() ? 'yes' : 'no'); if ($definition->getFile()) { - $description[] = sprintf('Required File %s', $definition->getFile() ?: '-'); + $tableRows[] = array('Required File', $definition->getFile() ? $definition->getFile() : '-'); } if ($definition->getFactoryClass(false)) { - $description[] = sprintf('Factory Class %s', $definition->getFactoryClass(false)); + $tableRows[] = array('Factory Class', $definition->getFactoryClass(false)); } if ($definition->getFactoryService(false)) { - $description[] = sprintf('Factory Service %s', $definition->getFactoryService(false)); + $tableRows[] = array('Factory Service', $definition->getFactoryService(false)); } if ($definition->getFactoryMethod(false)) { - $description[] = sprintf('Factory Method %s', $definition->getFactoryMethod(false)); + $tableRows[] = array('Factory Method', $definition->getFactoryMethod(false)); } if ($factory = $definition->getFactory()) { if (is_array($factory)) { if ($factory[0] instanceof Reference) { - $description[] = sprintf('Factory Service %s', $factory[0]); + $tableRows[] = array('Factory Service', $factory[0]); } elseif ($factory[0] instanceof Definition) { throw new \InvalidArgumentException('Factory is not describable.'); } else { - $description[] = sprintf('Factory Class %s', $factory[0]); + $tableRows[] = array('Factory Class', $factory[0]); } - $description[] = sprintf('Factory Method %s', $factory[1]); + $tableRows[] = array('Factory Method', $factory[1]); } else { - $description[] = sprintf('Factory Function %s', $factory); + $tableRows[] = array('Factory Function', $factory); } } - $this->writeText(implode("\n", $description)."\n", $options); + $options['output']->table($tableHeaders, $tableRows); } /** @@ -317,7 +326,7 @@ class TextDescriptor extends Descriptor */ protected function describeContainerAlias(Alias $alias, array $options = array()) { - $this->writeText(sprintf("This service is an alias for the service %s\n", (string) $alias), $options); + $options['output']->comment(sprintf("This service is an alias for the service %s\n", (string) $alias)); } /** @@ -325,7 +334,12 @@ class TextDescriptor extends Descriptor */ protected function describeContainerParameter($parameter, array $options = array()) { - $this->writeText($this->formatParameter($parameter), $options); + $options['output']->table( + array('Parameter', 'Value'), + array( + array($options['parameter'], $this->formatParameter($parameter), + ), + )); } /** @@ -344,16 +358,33 @@ class TextDescriptor extends Descriptor $this->writeText($this->formatSection('event_dispatcher', $label)."\n", $options); - $registeredListeners = $eventDispatcher->getListeners($event, true); + $registeredListeners = $eventDispatcher->getListeners($event); if (null !== $event) { $this->writeText("\n"); - $this->renderEventListenerTable($registeredListeners); + $table = new Table($this->getOutput()); + $table->getStyle()->setCellHeaderFormat('%s'); + $table->setHeaders(array('Order', 'Callable')); + + foreach ($registeredListeners as $order => $listener) { + $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($listener))); + } + + $table->render(); } else { ksort($registeredListeners); foreach ($registeredListeners as $eventListened => $eventListeners) { $this->writeText(sprintf("\n[Event] %s\n", $eventListened), $options); - $this->renderEventListenerTable($eventListeners); + + $table = new Table($this->getOutput()); + $table->getStyle()->setCellHeaderFormat('%s'); + $table->setHeaders(array('Order', 'Callable')); + + foreach ($eventListeners as $order => $eventListener) { + $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener))); + } + + $table->render(); } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php index 38dda10ba7..5a5b48e25f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php @@ -11,7 +11,9 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor; +use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; @@ -149,6 +151,11 @@ abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase { $options['raw_output'] = true; $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); + + if ('txt' === $this->getFormat()) { + $options['output'] = new SymfonyStyle(new ArrayInput(array()), $output); + } + $this->getDescriptor()->describe($output, $describedObject, $options); if ('json' === $this->getFormat()) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.txt index 3d40ba0084..c3b9987ec2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.txt @@ -1 +1 @@ -This service is an alias for the service service_1 +// This service is an alias for the service service_1 \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.txt index df99e817c9..b53b090b5f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.txt @@ -1 +1 @@ -This service is an alias for the service service_2 +// This service is an alias for the service service_2 \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt index 5fdbdfd439..cc56a5a6c4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt @@ -1,6 +1,11 @@ -[container] Public services - Service ID  Class name  - alias_1 alias for "service_1" - alias_2 alias for "service_2" - definition_1 Full\Qualified\Class1 - service_container Symfony\Component\DependencyInjection\ContainerBuilder +Symfony Container Public Services +================================= + + ------------------- -------------------------------------------------------- + Service ID Class name + ------------------- -------------------------------------------------------- + alias_1 alias for "service_1" + alias_2 alias for "service_2" + definition_1 Full\Qualified\Class1 + service_container Symfony\Component\DependencyInjection\ContainerBuilder + ------------------- -------------------------------------------------------- \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt index 662664fc97..f539a2db7e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt @@ -1,7 +1,12 @@ -[container] Public and private services - Service ID  Class name  - alias_1 alias for "service_1" - alias_2 alias for "service_2" - definition_1 Full\Qualified\Class1 - definition_2 Full\Qualified\Class2 - service_container Symfony\Component\DependencyInjection\ContainerBuilder +Symfony Container Public and Private Services +============================================= + + ------------------- -------------------------------------------------------- + Service ID Class name + ------------------- -------------------------------------------------------- + alias_1 alias for "service_1" + alias_2 alias for "service_2" + definition_1 Full\Qualified\Class1 + definition_2 Full\Qualified\Class2 + service_container Symfony\Component\DependencyInjection\ContainerBuilder + ------------------- -------------------------------------------------------- \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt index b506c5c922..fd55212ad2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt @@ -1,4 +1,9 @@ -[container] Public and private services with tag tag1 - Service ID  attr1 attr2 attr3 Class name  - definition_2 val1 val2 Full\Qualified\Class2 - " val3 +Symfony Container Public and Private Services Tagged with "tag1" Tag +==================================================================== + + -------------- ------- ------- ------- ----------------------- + Service ID attr1 attr2 attr3 Class name + -------------- ------- ------- ------- ----------------------- + definition_2 val1 val2 Full\Qualified\Class2 + " val3 + -------------- ------- ------- ------- ----------------------- \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt index 791c1d95c3..f187bbdd70 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.txt @@ -1,6 +1,12 @@ -[container] Tagged services -[tag] tag1 -definition_2 +Symfony Container Public and Private Tags +========================================= -[tag] tag2 -definition_2 +"tag1" tag +---------- + + * definition_2 + +"tag2" tag +---------- + + * definition_2 \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt index 4c37faccf2..cd7b8d82fd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt @@ -1,12 +1,15 @@ -Service Id - -Class Full\Qualified\Class1 -Tags - -Scope container -Public yes -Synthetic no -Lazy yes -Shared yes -Synchronized no -Abstract yes -Factory Class Full\Qualified\FactoryClass -Factory Method get +---------------- ----------------------------- + Option Value + ---------------- ----------------------------- + Service ID - + Class Full\Qualified\Class1 + Tags - + Scope container + Public yes + Synthetic no + Lazy yes + Synchronized no + Abstract yes + Factory Class Full\Qualified\FactoryClass + Factory Method get + ---------------- ----------------------------- \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt index 62fc7d2dc6..02f02535ad 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt @@ -1,16 +1,16 @@ -Service Id - -Class Full\Qualified\Class2 -Tags - - tag1 (attr1: val1, attr2: val2) - - tag1 (attr3: val3) - - tag2 () -Scope container -Public no -Synthetic yes -Lazy no -Shared yes -Synchronized no -Abstract no -Required File /path/to/file -Factory Service factory.service -Factory Method get + ----------------- ------------------------------------------------------- + Option Value + ----------------- ------------------------------------------------------- + Service ID - + Class Full\Qualified\Class2 + Tags tag1 (attr1: val1, attr2: val2)tag1 (attr3: val3)tag2 + Scope container + Public no + Synthetic yes + Lazy no + Synchronized no + Abstract no + Required File /path/to/file + Factory Service factory.service + Factory Method get + ----------------- ------------------------------------------------------- diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt index 45035d12d6..160bb33483 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt @@ -1,8 +1,8 @@ [event_dispatcher] Registered listeners for event event1 -+-------+-------------------+----------+ -| Order | Callable | Priority | -+-------+-------------------+----------+ -| #1 | global_function() | 255 | -| #2 | \Closure() | -1 | -+-------+-------------------+----------+ ++-------+-------------------+ +| Order | Callable | ++-------+-------------------+ +| #1 | global_function() | +| #2 | \Closure() | ++-------+-------------------+ \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt index 88e5dc9c89..84e39634e4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt @@ -1,16 +1,16 @@ [event_dispatcher] Registered listeners by event [Event] event1 -+-------+-------------------+----------+ -| Order | Callable | Priority | -+-------+-------------------+----------+ -| #1 | global_function() | 255 | -| #2 | \Closure() | -1 | -+-------+-------------------+----------+ ++-------+-------------------+ +| Order | Callable | ++-------+-------------------+ +| #1 | global_function() | +| #2 | \Closure() | ++-------+-------------------+ [Event] event2 -+-------+-----------------------------------------------------------------------------------+----------+ -| Order | Callable | Priority | -+-------+-----------------------------------------------------------------------------------+----------+ -| #1 | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() | 0 | -+-------+-----------------------------------------------------------------------------------+----------+ ++-------+-----------------------------------------------------------------------------------+ +| Order | Callable | ++-------+-----------------------------------------------------------------------------------+ +| #1 | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() | ++-------+-----------------------------------------------------------------------------------+ \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.txt index 09340efcf5..70062016ff 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.txt @@ -1,12 +1,15 @@ -Service Id - -Class Full\Qualified\Class1 -Tags - -Scope container -Public yes -Synthetic no -Lazy yes -Shared yes -Synchronized yes -Abstract yes -Factory Class Full\Qualified\FactoryClass -Factory Method get +---------------- ----------------------------- + Option Value + ---------------- ----------------------------- + Service ID - + Class Full\Qualified\Class1 + Tags - + Scope container + Public yes + Synthetic no + Lazy yes + Synchronized yes + Abstract yes + Factory Class Full\Qualified\FactoryClass + Factory Method get + ---------------- ----------------------------- \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.txt index 62fc7d2dc6..d87deef416 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.txt @@ -1,16 +1,16 @@ -Service Id - -Class Full\Qualified\Class2 -Tags - - tag1 (attr1: val1, attr2: val2) - - tag1 (attr3: val3) - - tag2 () -Scope container -Public no -Synthetic yes -Lazy no -Shared yes -Synchronized no -Abstract no -Required File /path/to/file -Factory Service factory.service -Factory Method get +----------------- ------------------------------------------------------- + Option Value + ----------------- ------------------------------------------------------- + Service ID - + Class Full\Qualified\Class2 + Tags tag1 (attr1: val1, attr2: val2)tag1 (attr3: val3)tag2 + Scope container + Public no + Synthetic yes + Lazy no + Synchronized no + Abstract no + Required File /path/to/file + Factory Service factory.service + Factory Method get + ----------------- ------------------------------------------------------- \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt index 6bc5995f62..34a6f43dba 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt @@ -1 +1,5 @@ -symfony \ No newline at end of file +--------------- --------- + Parameter Value + --------------- --------- + database_name symfony + --------------- --------- \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt index 8a1b02c178..8636c066e5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt @@ -1,6 +1,11 @@ -[container] List of parameters - Parameter Value  - array [12,"Hello world!",true] - boolean true - integer 12 - string Hello world! +Symfony Container Parameters +============================ + + ----------- -------------------------- + Parameter Value + ----------- -------------------------- + array [12,"Hello world!",true] + boolean true + integer 12 + string Hello world! + ----------- -------------------------- \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt index ab487d4620..708438a10c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt @@ -1,6 +1,6 @@ -+---------+----------+------------+-----------+---------------+ -| Name | Method | Scheme | Host | Path | -+---------+----------+------------+-----------+---------------+ -| route_1 | GET|HEAD | http|https | localhost | /hello/{name} | -| route_2 | PUT|POST | http|https | localhost | /name/add | -+---------+----------+------------+-----------+---------------+ +--------- ---------- ------------ ----------- --------------- + Name Method Scheme Host Path + --------- ---------- ------------ ----------- --------------- + route_1 GET|HEAD http|https localhost /hello/{name} + route_2 PUT|POST http|https localhost /name/add + --------- ---------- ------------ ----------- --------------- \ No newline at end of file