Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #23556 [Console] Fix registering lazy command services with aut…
…oconfigure enabled (chalasr) This PR was merged into the 3.4 branch. Discussion ---------- [Console] Fix registering lazy command services with autoconfigure enabled | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a For ```yaml _defaults: autoconfigure: true App\: resource: '../../src/*' App\Command\FooCommand: tags: - { name: console.command, command: foo } ``` Before you get the following error: > Missing "command" attribute on tag "console.command" for service "App\Command\FooCommand" Now the command is lazy. ---- Btw, @Tobion's #22734 (comment) > Wouldn't it be more straightforward if aliases are just the additional tags using the command attribute as well? Then there is no need for an alias property at all and this strange condition doesn't apply either. Partially addressed here by removing the need for repeating the `command` attribute on each `console.command` tag ```yaml # before tags: - { name: console.command, command: foo } - { name: console.command, command: foo, alias: foobar } # after tags: - { name: console.command, command: foo } - { name: console.command, alias: foobar } ``` Tobias proposal: ```yaml tags: - { name: console.command, command: app:my-command } - { name: console.command, command: app:my-alias } ``` I wanted to propose exactly the same at first, but finally found more clear to add a specific attribute for aliases, especially because relying on the order on which tags are defined sounds less good to me. Please tell me about your preference. (And sorry for the noise around this feature, I want to polish it for 3.4) Commits ------- 8a71aa3 Fix registering lazy command services with autoconfigure enabled
- Loading branch information