-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
e02c2f3
to
94cb377
Compare
Ping @nicolas-grekas : Can you take a look at that one? The tests on |
612d127
to
219f455
Compare
@saro0h IMO, and when possible, we should remove usage of deprecated classes in the oldest possible branch. |
219f455
to
0f66a54
Compare
I definitely can but I'll be obliged to do 2 PR (or more) because of the evolution of code between version. Here is one exemple:
Do you want me to do the work of removing the deprecated on all branches maintained on Symfony? |
This is basically the same as #12970. |
@xabbuh No it's not: the code changed between the two branches. |
@saro0h Indeed, I missed that change. Thanks. |
@@ -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'])); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
0f66a54
to
852afac
Compare
} | ||
} | ||
|
||
$table->render(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this here means you will output a table with headers but without any content rows. It's not exactly the same behavior.
7853b2a
to
7f30017
Compare
Looks good! |
7f30017
to
adffcde
Compare
@@ -302,6 +302,8 @@ protected function describeEventDispatcherListeners(EventDispatcherInterface $ev | ||
$this->writeText($this->formatSection('event_dispatcher', $label)."\n", $options); | ||
|
||
$registeredListeners = $eventDispatcher->getListeners($event); | ||
$table = new Table($this->getOutput()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it's not needed
adffcde
to
08a5b5a
Compare
Thank you @saro0h. |
…aro0h) This PR was merged into the 2.7 branch. Discussion ---------- [2.7][FrameworkBundle] Removed the use of TableHelper | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ The PR #13121 on 3.0 removed the ``TableHelper `` class. Now the tests don't pass when using ``components=high`` version of dependencis, because of the use of the deprecated TableHelper. This one removes the use of ``TableHelper`` without the removal of the ``TableHelper`` class, and adapt the existing code to use the Table class instead. Commits ------- 08a5b5a [FrameworkBundle] Removed the use of TableHelper
The PR #13121 on 3.0 removed the
TableHelper
class. Now the tests don't pass when usingcomponents=high
version of dependencis, because of the use of the deprecated TableHelper.This one removes the use of
TableHelper
without the removal of theTableHelper
class, and adapt the existing code to use the Table class instead.