-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
app/console list finds a namespace ambiguous if it only consists of sub-namespaces #10531
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
Comments
this is a duplicate i believe, just can't recall the issue number, but sure i have ran into this. The logic is messy inside and i believe it lacks tests so is actually tedious to refactor and implement what you said. Basically what we should add to the documentation is we are supporting only one level of : and that is it. It does not have full nth : level support. |
@cordoval the issue is that multiple levels of and most third-party bundles I know are also relying on it to isolate their commands to avoid conficts ( |
I think it's pretty easy to solve this little glitch, as @kachkaev mentioned the problem is within Symfony\Component\Console\Application::getNamespaces() which clearly mentions |
I am having a look at this. |
This PR was merged into the 2.3 branch. Discussion ---------- [Console] fixed 10531 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #10531 | License | MIT | Doc PR | - This is a fix for #10531. It works by extracting all the parent namespaces of a command. Commits ------- e6afff4 [Console] fixed #10531
* 2.3: [2.3] [HttpFoundation] [MimeTypeGuesser] Removed dead code and various cleaning [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed #10531 Make the container considered non-fresh if the environment parameters are changed Conflicts: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig src/Symfony/Component/Console/Tests/ApplicationTest.php src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
* 2.5: [2.3] [HttpFoundation] [MimeTypeGuesser] Removed dead code and various cleaning [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed #10531 Make the container considered non-fresh if the environment parameters are changed Conflicts: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
* 2.6: [2.3] [HttpFoundation] [MimeTypeGuesser] Removed dead code and various cleaning Removed dead code and various cleaning [FrameworkBundle][xsd] added missing logging attribute. [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed #10531 Make the container considered non-fresh if the environment parameters are changed
* 2.7: fixed tests [OptionsResolver] replaced some exception messages Added i18n support to ConfirmationQuestion [HttpKernel] [WebProfilerBundle] added HTTP status to profiler search result [Form] fixed form tests when using 2.7 deps [2.3] [HttpFoundation] [MimeTypeGuesser] [Routing] merge instead of replace class and method scheme/method annotations [TwigBridge] Fix bootstrap rendering when user explicitly use form_label Removed dead code and various cleaning Removed dead code and various cleaning Fixed HtmlDumper with long string Removed dead code and various cleaning [FrameworkBundle][xsd] added missing logging attribute. [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed #10531 Make the container considered non-fresh if the environment parameters are changed Conflicts: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig src/Symfony/Component/HttpKernel/CHANGELOG.md src/Symfony/Component/Process/Process.php
* 2.7: fixed tests [OptionsResolver] replaced some exception messages Added i18n support to ConfirmationQuestion [HttpKernel] [WebProfilerBundle] added HTTP status to profiler search result [Form] fixed form tests when using 2.7 deps [2.3] [HttpFoundation] [MimeTypeGuesser] [Routing] merge instead of replace class and method scheme/method annotations [TwigBridge] Fix bootstrap rendering when user explicitly use form_label Removed dead code and various cleaning Removed dead code and various cleaning Fixed HtmlDumper with long string Removed dead code and various cleaning [FrameworkBundle][xsd] added missing logging attribute. [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed symfony#10531 Make the container considered non-fresh if the environment parameters are changed Conflicts: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig src/Symfony/Component/HttpKernel/CHANGELOG.md src/Symfony/Component/Process/Process.php
* 2.3: [2.3] [HttpFoundation] [MimeTypeGuesser] Removed dead code and various cleaning [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed symfony#10531 Make the container considered non-fresh if the environment parameters are changed Conflicts: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig src/Symfony/Bridge/Twig/Resources/views/Form/form_table_layout.html.twig src/Symfony/Component/Console/Tests/ApplicationTest.php src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
* 2.5: [2.3] [HttpFoundation] [MimeTypeGuesser] Removed dead code and various cleaning [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed symfony#10531 Make the container considered non-fresh if the environment parameters are changed Conflicts: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
* 2.6: [2.3] [HttpFoundation] [MimeTypeGuesser] Removed dead code and various cleaning Removed dead code and various cleaning [FrameworkBundle][xsd] added missing logging attribute. [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed symfony#10531 Make the container considered non-fresh if the environment parameters are changed
* 2.7: fixed tests [OptionsResolver] replaced some exception messages Added i18n support to ConfirmationQuestion [HttpKernel] [WebProfilerBundle] added HTTP status to profiler search result [Form] fixed form tests when using 2.7 deps [2.3] [HttpFoundation] [MimeTypeGuesser] [Routing] merge instead of replace class and method scheme/method annotations [TwigBridge] Fix bootstrap rendering when user explicitly use form_label Removed dead code and various cleaning Removed dead code and various cleaning Fixed HtmlDumper with long string Removed dead code and various cleaning [FrameworkBundle][xsd] added missing logging attribute. [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed symfony#10531 Make the container considered non-fresh if the environment parameters are changed Conflicts: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig src/Symfony/Component/HttpKernel/CHANGELOG.md src/Symfony/Component/Process/Process.php
If, for example, a project consists of the following commands:
calling
app/console list my-website
causes an exception:This does not look like what would be expected. Adding a command into
my-website
namespace directly (e.g.my-website:test
) helps to avoid the issue – command listing starts working fine.Perhaps, the problem is in Symfony\Component\Console\Application::getNamespaces() – this method registers only one namespace per command, so parent namespaces remain unknown unless they contain any commands directly.
The text was updated successfully, but these errors were encountered: