Skip to content

[TwigComponent] Error in debug:twig-component with anonymous components in a bundle directory #2171

Closed
@tacman

Description

@tacman

Anonymous components within a bundle work as expected:

bin/console debug:twig-component

| SurvosBootstrap:accordion            |                                                              | @SurvosBootstrap/components/accordion.html.twig            | Anon |
| SurvosBootstrap:dropdown             |                                                              | @SurvosBootstrap/components/dropdown.html.twig             | Anon |
| SurvosBootstrap:tabs                 |                                                              | @SurvosBootstrap/components/tabs.html.twig                 | Anon |

However, if I create a component in a directory, it fails:

# in the bundle's templates/components directory
mkdir tabler && touch tabler/history-widget.html.twig

back to the app

bin/console debug:twig-component
In ComponentFactory.php line 254:
                                                                                                      
  Unknown component "tabler:history-widget". And no matching anonymous component template was found.  
                                                                                                      

debug:twig-component [<name>]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions