-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBundle][FrameworkBundle] Remove the internals from debug autowiring #25011
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
[TwigBundle][FrameworkBundle] Remove the internals from debug autowiring #25011
Conversation
Test don't pass yet :)
|
4991228
to
bc7c0f0
Compare
<tag name="console.command" command="lint:yaml" /> | ||
</service> | ||
|
||
<service id="Symfony\Component\Form\Command\DebugCommand"> | ||
<service id="console.debug_command" class="Symfony\Component\Form\Command\DebugCommand"> |
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.
suffix "command" here, but not on the other ones, should it be always here?
@@ -314,7 +313,7 @@ public function testWorkflowServicesCanBeEnabled() | |||
$container = $this->createContainerFromFile('workflows_enabled'); | |||
|
|||
$this->assertTrue($container->has(Registry::class)); | |||
$this->assertTrue($container->hasDefinition(WorkflowDumpCommand::class)); | |||
$this->assertTrue($container->hasDefinition('console.workflow_dump')); |
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.
console.command.workflow_dump
? other convention?
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.
console.command.<underscored_name>
👍
@@ -112,13 +112,13 @@ | |||
<argument>%kernel.debug%</argument> | |||
</service> | |||
|
|||
<service id="Symfony\Bundle\FrameworkBundle\Controller\RedirectController" public="true"> | |||
<service id="framework.controller.redirect" class="Symfony\Bundle\FrameworkBundle\Controller\RedirectController" public="true"> |
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.
I think we need to keep this and the next one, not for autowiring, but to ease routing
bc7c0f0
to
7aab8a9
Compare
The review has been taken into account. |
<tag name="console.command" command="lint:yaml" /> | ||
</service> | ||
|
||
<service id="Symfony\Component\Form\Command\DebugCommand"> | ||
<service id="console.command.debug" class="Symfony\Component\Form\Command\DebugCommand"> |
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.
console.command.form_debug
id say
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.
agreed
@@ -314,7 +313,7 @@ public function testWorkflowServicesCanBeEnabled() | |||
$container = $this->createContainerFromFile('workflows_enabled'); | |||
|
|||
$this->assertTrue($container->has(Registry::class)); | |||
$this->assertTrue($container->hasDefinition(WorkflowDumpCommand::class)); | |||
$this->assertTrue($container->hasDefinition('console.workflow_dump')); |
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.
console.command.<underscored_name>
👍
@@ -7,13 +7,13 @@ | |||
<services> | |||
<defaults public="false" /> | |||
|
|||
<service id="Symfony\Bridge\Twig\Command\DebugCommand"> | |||
<service id="twig.debug_command" class="Symfony\Bridge\Twig\Command\DebugCommand"> |
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.
twig.commmand.*
?
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.
would make sense for consistency.
@@ -7,101 +7,101 @@ | |||
<services> | |||
<defaults public="false" /> | |||
|
|||
<service id="console.error_listener" class="Symfony\Component\Console\EventListener\ErrorListener"> | |||
<service id="console.command.error_listener" class="Symfony\Component\Console\EventListener\ErrorListener"> |
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.
renamig is not good. This service is not a command
<tag name="console.command" command="lint:yaml" /> | ||
</service> | ||
|
||
<service id="Symfony\Component\Form\Command\DebugCommand"> | ||
<service id="console.command.debug" class="Symfony\Component\Form\Command\DebugCommand"> |
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.
agreed
<argument type="service" id="translation.writer" /> | ||
<argument type="service" id="translation.reader" /> | ||
<argument type="service" id="translation.extractor" /> | ||
<argument>%kernel.default_locale%</argument> | ||
<tag name="console.command" command="translation:update" /> | ||
</service> | ||
|
||
<service id="Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand"> | ||
<service id='console.workflow_dump' class="Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand"> |
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.
missing .command
for consistency
@@ -7,13 +7,13 @@ | |||
<services> | |||
<defaults public="false" /> | |||
|
|||
<service id="Symfony\Bridge\Twig\Command\DebugCommand"> | |||
<service id="twig.debug_command" class="Symfony\Bridge\Twig\Command\DebugCommand"> |
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.
would make sense for consistency.
@nicolas-grekas if that's what you wonder, AddConsoleCommandPass should process correctly no matter the service id |
7aab8a9
to
ec069ef
Compare
done @stof |
<argument type="service" id="translation.writer" /> | ||
<argument type="service" id="translation.reader" /> | ||
<argument type="service" id="translation.extractor" /> | ||
<argument>%kernel.default_locale%</argument> | ||
<tag name="console.command" command="translation:update" /> | ||
</service> | ||
|
||
<service id="Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand"> | ||
<service id='console.command.workflow_dump' class="Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand"> |
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.
double quote
ec069ef
to
e2ecf05
Compare
e2ecf05
to
491839b
Compare
There are two remaining services when testing this with the standard edition:
looking more precisely with @Simperfit, we discovered that these classes are actually registered twice: first with a class as id, second with a regular id. Needs to be understood and fixed. |
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.
(the remaining two services are declared by SensioFrameworkExtraBundle)
Thank you @Simperfit. |
…debug autowiring (Simperfit) This PR was merged into the 3.4 branch. Discussion ---------- [TwigBundle][FrameworkBundle] Remove the internals from debug autowiring | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? |no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | #24986 | License | MIT | Doc PR | #SymfonyConHackday2017 @nicolas-grekas @weaverryan @fabpot @stof It should be OK to review and to merge. Commits ------- 491839b [TwigBundle][FrameworkBundle] Remove the internals from debug autowiring
This PR was merged into the 3.4 branch. Discussion ---------- [Form] Fix debug:form command definition | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Sadly these changes were forgotten in #25011 and the `debug:form` command does not work properly right now :( Commits ------- 97fdf31 Fix debug:form definition
#SymfonyConHackday2017
@nicolas-grekas @weaverryan @fabpot @stof It should be OK to review and to merge.