diff --git a/bundle/DependencyInjection/EzPublishLegacyExtension.php b/bundle/DependencyInjection/EzPublishLegacyExtension.php index b24b37ac..a36fec71 100644 --- a/bundle/DependencyInjection/EzPublishLegacyExtension.php +++ b/bundle/DependencyInjection/EzPublishLegacyExtension.php @@ -8,6 +8,7 @@ */ namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection; +use Assetic\Factory\Loader\FormulaLoaderInterface; use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor; use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface; use Symfony\Component\HttpKernel\DependencyInjection\Extension; @@ -42,6 +43,10 @@ public function load(array $configs, ContainerBuilder $container) // Templating $loader->load('templating.yml'); + if (interface_exists(FormulaLoaderInterface::class)) { + $loader->load('assetic.yml'); + } + // View $loader->load('view.yml'); diff --git a/bundle/Resources/config/assetic.yml b/bundle/Resources/config/assetic.yml new file mode 100644 index 00000000..8a22f27b --- /dev/null +++ b/bundle/Resources/config/assetic.yml @@ -0,0 +1,6 @@ +services: + assetic.eztpl_formula_loader: + class: eZ\Publish\Core\MVC\Legacy\Templating\LegacyFormulaLoader + public: false + tags: + - {name: assetic.formula_loader, alias: eztpl} diff --git a/bundle/Resources/config/templating.yml b/bundle/Resources/config/templating.yml index ecc442b3..32d355fd 100644 --- a/bundle/Resources/config/templating.yml +++ b/bundle/Resources/config/templating.yml @@ -73,12 +73,6 @@ services: public: false arguments: ["@ezpublish_legacy.kernel", "@ezpublish_legacy.templating.object_converter"] - assetic.eztpl_formula_loader: - class: eZ\Publish\Core\MVC\Legacy\Templating\LegacyFormulaLoader - public: false - tags: - - {name: assetic.formula_loader, alias: eztpl} - twig.loader.string: class: eZ\Publish\Core\MVC\Legacy\Templating\Twig\LoaderString public: false