minor #15983 Updated the styles of the container commands (javiereguiluz)

This PR was squashed before being merged into the 2.8 branch (closes #15983).

Discussion
----------

Updated the styles of the container commands

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

This PR uses comment() which hasn't been merged yet. WIP PR at #15964

This command defines a lot of options, so I don't know if I've updated all the possible outputs:

![container_params](https://cloud.githubusercontent.com/assets/73419/10148240/a4265ed4-6632-11e5-97c6-56d9d5fc496b.png)

![container_tags](https://cloud.githubusercontent.com/assets/73419/10148244/a68f392a-6632-11e5-925d-60eec7d659af.png)

![container_one_service](https://cloud.githubusercontent.com/assets/73419/10148224/8708c7b0-6632-11e5-9a4e-efd3c8206bc1.png)

![container_select_service](https://cloud.githubusercontent.com/assets/73419/10148225/88e88d9a-6632-11e5-969a-57a1f6efc17f.png)

![container_one_parameter](https://cloud.githubusercontent.com/assets/73419/10148227/8c92d342-6632-11e5-9d95-53bb71b6f67d.png)

![container_tagged_services](https://cloud.githubusercontent.com/assets/73419/10148229/9070a002-6632-11e5-8af9-e1d0579d539e.png)

Commits
-------

d209a4e Updated the styles of the container commands
This commit is contained in:
Fabien Potencier 2015-10-01 21:15:02 +02:00
commit 238419fb5f
18 changed files with 255 additions and 182 deletions

View File

@ -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('<comment>The use of "container:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:container" instead.</comment>');
$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. <comment>debug:container log</comment>');
$output->comment('To search for a specific service, re-run this command with a search term. (e.g. <comment>debug:container log</comment>)');
}
}
@ -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)

View File

@ -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 <info>%s</info>', $options['id']))
."\n".sprintf('<comment>Service Id</comment> %s', isset($options['id']) ? $options['id'] : '-')
."\n".sprintf('<comment>Class</comment> %s', get_class($service));
$this->writeText($description, $options);
$options['output']->title(sprintf('Information for Service "<info>%s</info>"', $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 = '<comment>Public</comment> and <comment>private</comment> services';
$title = 'Symfony Container Public and Private Services';
} else {
$label = '<comment>Public</comment> services';
$title = 'Symfony Container Public Services';
}
if ($showTag) {
$label .= ' with tag <info>'.$options['tag'].'</info>';
$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 <info>%s</info>', $options['id'])))
: array();
if (isset($options['id'])) {
$options['output']->title(sprintf('Information for Service "<info>%s</info>"', $options['id']));
}
$description[] = sprintf('<comment>Service Id</comment> %s', isset($options['id']) ? $options['id'] : '-');
$description[] = sprintf('<comment>Class</comment> %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[] = '<comment>Tags</comment>';
$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('<info>%s</info>: %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[] = '<comment>Tags</comment> -';
$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('<comment>Scope</comment> %s', $definition->getScope(false));
$description[] = sprintf('<comment>Public</comment> %s', $definition->isPublic() ? 'yes' : 'no');
$description[] = sprintf('<comment>Synthetic</comment> %s', $definition->isSynthetic() ? 'yes' : 'no');
$description[] = sprintf('<comment>Lazy</comment> %s', $definition->isLazy() ? 'yes' : 'no');
if (method_exists($definition, 'isShared')) {
$description[] = sprintf('<comment>Shared</comment> %s', $definition->isShared() ? 'yes' : 'no');
}
if (method_exists($definition, 'isSynchronized')) {
$description[] = sprintf('<comment>Synchronized</comment> %s', $definition->isSynchronized(false) ? 'yes' : 'no');
$tableRows[] = array('Synchronized', $definition->isSynchronized(false) ? 'yes' : 'no');
}
$description[] = sprintf('<comment>Abstract</comment> %s', $definition->isAbstract() ? 'yes' : 'no');
$tableRows[] = array('Abstract', $definition->isAbstract() ? 'yes' : 'no');
if ($definition->getFile()) {
$description[] = sprintf('<comment>Required File</comment> %s', $definition->getFile() ?: '-');
$tableRows[] = array('Required File', $definition->getFile() ? $definition->getFile() : '-');
}
if ($definition->getFactoryClass(false)) {
$description[] = sprintf('<comment>Factory Class</comment> %s', $definition->getFactoryClass(false));
$tableRows[] = array('Factory Class', $definition->getFactoryClass(false));
}
if ($definition->getFactoryService(false)) {
$description[] = sprintf('<comment>Factory Service</comment> %s', $definition->getFactoryService(false));
$tableRows[] = array('Factory Service', $definition->getFactoryService(false));
}
if ($definition->getFactoryMethod(false)) {
$description[] = sprintf('<comment>Factory Method</comment> %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('<comment>Factory Service</comment> %s', $factory[0]);
$tableRows[] = array('Factory Service', $factory[0]);
} elseif ($factory[0] instanceof Definition) {
throw new \InvalidArgumentException('Factory is not describable.');
} else {
$description[] = sprintf('<comment>Factory Class</comment> %s', $factory[0]);
$tableRows[] = array('Factory Class', $factory[0]);
}
$description[] = sprintf('<comment>Factory Method</comment> %s', $factory[1]);
$tableRows[] = array('Factory Method', $factory[1]);
} else {
$description[] = sprintf('<comment>Factory Function</comment> %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 <info>%s</info>\n", (string) $alias), $options);
$options['output']->comment(sprintf("This service is an alias for the service <info>%s</info>\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<info>[Event]</info> %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();
}
}
}

View File

@ -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()) {

View File

@ -1 +1 @@
This service is an alias for the service <info>service_1</info>
// This service is an alias for the service service_1

View File

@ -1 +1 @@
This service is an alias for the service <info>service_2</info>
// This service is an alias for the service service_2

View File

@ -1,6 +1,11 @@
<info>[container]</info> <comment>Public</comment> 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
------------------- --------------------------------------------------------

View File

@ -1,7 +1,12 @@
<info>[container]</info> <comment>Public</comment> and <comment>private</comment> 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
------------------- --------------------------------------------------------

View File

@ -1,4 +1,9 @@
<info>[container]</info> <comment>Public</comment> and <comment>private</comment> services with tag <info>tag1</info>
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
-------------- ------- ------- ------- -----------------------

View File

@ -1,6 +1,12 @@
<info>[container]</info> Tagged services
<info>[tag]</info> tag1
definition_2
Symfony Container Public and Private Tags
=========================================
<info>[tag]</info> tag2
definition_2
"tag1" tag
----------
* definition_2
"tag2" tag
----------
* definition_2

View File

@ -1,12 +1,15 @@
<comment>Service Id</comment> -
<comment>Class</comment> Full\Qualified\Class1
<comment>Tags</comment> -
<comment>Scope</comment> container
<comment>Public</comment> yes
<comment>Synthetic</comment> no
<comment>Lazy</comment> yes
<comment>Shared</comment> yes
<comment>Synchronized</comment> no
<comment>Abstract</comment> yes
<comment>Factory Class</comment> Full\Qualified\FactoryClass
<comment>Factory Method</comment> 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
---------------- -----------------------------

View File

@ -1,16 +1,16 @@
<comment>Service Id</comment> -
<comment>Class</comment> Full\Qualified\Class2
<comment>Tags</comment>
- tag1 (<info>attr1</info>: val1, <info>attr2</info>: val2)
- tag1 (<info>attr3</info>: val3)
- tag2 ()
<comment>Scope</comment> container
<comment>Public</comment> no
<comment>Synthetic</comment> yes
<comment>Lazy</comment> no
<comment>Shared</comment> yes
<comment>Synchronized</comment> no
<comment>Abstract</comment> no
<comment>Required File</comment> /path/to/file
<comment>Factory Service</comment> factory.service
<comment>Factory Method</comment> 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
----------------- -------------------------------------------------------

View File

@ -1,8 +1,8 @@
<info>[event_dispatcher]</info> Registered listeners for event <info>event1</info>
+-------+-------------------+----------+
| Order | Callable | Priority |
+-------+-------------------+----------+
| #1 | global_function() | 255 |
| #2 | \Closure() | -1 |
+-------+-------------------+----------+
+-------+-------------------+
| Order | Callable |
+-------+-------------------+
| #1 | global_function() |
| #2 | \Closure() |
+-------+-------------------+

View File

@ -1,16 +1,16 @@
<info>[event_dispatcher]</info> Registered listeners by event
<info>[Event]</info> event1
+-------+-------------------+----------+
| Order | Callable | Priority |
+-------+-------------------+----------+
| #1 | global_function() | 255 |
| #2 | \Closure() | -1 |
+-------+-------------------+----------+
+-------+-------------------+
| Order | Callable |
+-------+-------------------+
| #1 | global_function() |
| #2 | \Closure() |
+-------+-------------------+
<info>[Event]</info> 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() |
+-------+-----------------------------------------------------------------------------------+

View File

@ -1,12 +1,15 @@
<comment>Service Id</comment> -
<comment>Class</comment> Full\Qualified\Class1
<comment>Tags</comment> -
<comment>Scope</comment> container
<comment>Public</comment> yes
<comment>Synthetic</comment> no
<comment>Lazy</comment> yes
<comment>Shared</comment> yes
<comment>Synchronized</comment> yes
<comment>Abstract</comment> yes
<comment>Factory Class</comment> Full\Qualified\FactoryClass
<comment>Factory Method</comment> 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
---------------- -----------------------------

View File

@ -1,16 +1,16 @@
<comment>Service Id</comment> -
<comment>Class</comment> Full\Qualified\Class2
<comment>Tags</comment>
- tag1 (<info>attr1</info>: val1, <info>attr2</info>: val2)
- tag1 (<info>attr3</info>: val3)
- tag2 ()
<comment>Scope</comment> container
<comment>Public</comment> no
<comment>Synthetic</comment> yes
<comment>Lazy</comment> no
<comment>Shared</comment> yes
<comment>Synchronized</comment> no
<comment>Abstract</comment> no
<comment>Required File</comment> /path/to/file
<comment>Factory Service</comment> factory.service
<comment>Factory Method</comment> 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
----------------- -------------------------------------------------------

View File

@ -1 +1,5 @@
symfony
--------------- ---------
Parameter Value
--------------- ---------
database_name symfony
--------------- ---------

View File

@ -1,6 +1,11 @@
<info>[container]</info> 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!
----------- --------------------------

View File

@ -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
--------- ---------- ------------ ----------- ---------------