Overriding bundle templates via Twig namespaces is not possible #8929
Closed
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.