Skip to content

Overriding bundle templates via Twig namespaces is not possible #8929

Closed
@emodric

Description

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Sylius version 1.0.2

In Symfony, it is possible to override any bundle template by using Twig namespaces. Basically, you register an additional path for a namespace equal to the namespace of the bundle you wish to override.

However, it looks like that Sylius\Bundle\ThemeBundle\Templating\TemplateNameParser breaks this functionality as it assumes that for example @SyliusShop Twig namespace always corresponds to SyliusShopBundle bundle. In reality, @SyliusShop namespace can match any file system path as defined by twig.paths config.

Metadata

Assignees

No one assigned

    Labels

    Potential BugPotential bugs or bugfixes, that needs to be reproduced.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions