Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[2.7][FrameworkBundle] Removed the use of TableHelper #13197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function describeRouteCollection(RouteCollection $routes, array $optio
}

$this->writeText($this->formatSection('router', 'Current routes')."\n", $options);
$this->renderTable($table, !(isset($options['raw_output']) && $options['raw_output']));
$table->render();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You now don't make use of the decorated output anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, in 3.0, I removed that also to make it more "standard". So I did the same here.

}

/**
Expand Down Expand Up @@ -109,7 +109,7 @@ protected function describeContainerParameters(ParameterBag $parameters, array $
}

$this->writeText($this->formatSection('container', 'List of parameters')."\n", $options);
$this->renderTable($table, !(isset($options['raw_output']) && $options['raw_output']));
$table->render();
}

/**
Expand Down Expand Up @@ -232,7 +232,7 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o
}
}

$this->renderTable($table);
$table->render();
}

/**
Expand Down Expand Up @@ -302,6 +302,7 @@ protected function describeEventDispatcherListeners(EventDispatcherInterface $ev
$this->writeText($this->formatSection('event_dispatcher', $label)."\n", $options);

$registeredListeners = $eventDispatcher->getListeners($event);

if (null !== $event) {
$this->writeText("\n");
$table = new Table($this->getOutput());
Expand All @@ -312,7 +313,7 @@ protected function describeEventDispatcherListeners(EventDispatcherInterface $ev
$table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($listener)));
}

$this->renderTable($table, true);
$table->render();
} else {
ksort($registeredListeners);
foreach ($registeredListeners as $eventListened => $eventListeners) {
Expand All @@ -326,7 +327,7 @@ protected function describeEventDispatcherListeners(EventDispatcherInterface $ev
$table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener)));
}

$this->renderTable($table, true);
$table->render();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- Service: `service_1`
- Public: yes
- Public: yes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- Service: `service_2`
- Public: no
- Public: no
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ alias_2
Services
--------

- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder`
- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<info>[container]</info> <comment>Public</comment> services
Service ID Class name
Service ID  Class name 
alias_1 alias for "service_1"
alias_2 alias for "service_2"
definition_1 Full\Qualified\Class1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ alias_2
Services
--------

- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder`
- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder`
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<info>[container]</info> <comment>Public</comment> and <comment>private</comment> services
Service ID Class name
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

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<info>[container]</info> <comment>Public</comment> and <comment>private</comment> services with tag <info>tag1</info>
Service ID attr1 attr2 attr3 Class name
Service ID  attr1 attr2 attr3 Class name 
definition_2 val1 val2 Full\Qualified\Class2
" val3
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

- Type: `function`
- Name: `array_key_exists`
Original file line number Diff line number Diff line change
@@ -1 +1 @@
array_key_exists()
array_key_exists()
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

- Type: `function`
- Name: `staticMethod`
- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass`
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod()
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod()
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

- Type: `function`
- Name: `method`
- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass`
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::method()
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::method()
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

- Type: `function`
- Name: `staticMethod`
- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass`
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod()
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod()
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

- Type: `function`
- Name: `staticMethod`
- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass`
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass::parent::staticMethod()
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass::parent::staticMethod()
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@

- Type: `closure`
Original file line number Diff line number Diff line change
@@ -1 +1 @@
\Closure()
\Closure()
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

- Type: `object`
- Name: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass`

Original file line number Diff line number Diff line change
@@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke()
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke()
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- Class: `Full\Qualified\Class1`
- Scope: `container`
- Public: yes
- Synthetic: no
- Synthetic: no
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
- Attr2: val2
- Tag: `tag1`
- Attr3: val3
- Tag: `tag2`
- Tag: `tag2`
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
database_name
=============

symfony
symfony
Original file line number Diff line number Diff line change
@@ -1 +1 @@
symfony
symfony
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Container parameters
- `array`: `[12,"Hello world!",true]`
- `boolean`: `true`
- `integer`: `12`
- `string`: `Hello world!`
- `string`: `Hello world!`
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<info>[container]</info> List of parameters
Parameter Value
Parameter Value 
array [12,"Hello world!",true]
boolean true
integer 12
string Hello world!

Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
- Defaults:
- `name`: Joseph
- Requirements:
- `name`: [a-z]+
- `name`: [a-z]+
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
opt1: val1
opt2: val2
<comment>Path-Regex</comment> #^/hello(?:/(?P<name>[a-z]+))?$#s
<comment>Host-Regex</comment> #^localhost$#s
<comment>Host-Regex</comment> #^localhost$#s
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
- Method: PUT|POST
- Class: Symfony\Component\Routing\Route
- Defaults: NONE
- Requirements: NONE
- Requirements: NONE
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
opt1: val1
opt2: val2
<comment>Path-Regex</comment> #^/name/add$#s
<comment>Host-Regex</comment> #^localhost$#s
<comment>Host-Regex</comment> #^localhost$#s
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ route_2
- Class: Symfony\Component\Routing\Route
- Defaults: NONE
- Requirements: NONE

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<info>[router]</info> Current routes
Name Method Scheme Host Path
Name  Method  Scheme  Host  Path 
route_1 GET|HEAD http|https localhost /hello/{name}
route_2 PUT|POST http|https localhost /name/add

2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"require-dev": {
"symfony/browser-kit": "~2.4|~3.0.0",
"symfony/console": "~2.5|~3.0.0",
"symfony/console": "~2.6|~3.0.0",
"symfony/css-selector": "~2.0,>=2.0.5|~3.0.0",
"symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0",
"symfony/finder": "~2.0,>=2.0.5|~3.0.0",
Expand Down