diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 8f7dc263fd..44c1a168f9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -49,7 +49,6 @@ class FrameworkExtension extends Extension $loader->load('web.xml'); $loader->load('services.xml'); $loader->load('fragment_renderer.xml'); - $loader->load('assets.xml'); // A translator must always be registered (as support is included by // default in the Form component). If disabled, an identity translator @@ -562,6 +561,8 @@ class FrameworkExtension extends Extension */ private function registerAssetsConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader) { + $loader->load('assets.xml'); + $defaultVersion = $this->createVersion($container, $config['version'], $config['version_format'], '_default'); $defaultPackage = $this->createPackageDefinition($config['base_path'], $config['base_urls'], $defaultVersion); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/views/base.html.twig b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/views/base.html.twig index 4b9151eaf8..c3dddd319b 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/views/base.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Resources/views/base.html.twig @@ -4,7 +4,6 @@ {% block title %}Welcome!{% endblock %} {% block stylesheets %}{% endblock %} - {% block body %}{% endblock %} diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php index 59662e8350..309d435bf6 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php @@ -78,6 +78,10 @@ class ExtensionPass implements CompilerPassInterface $container->setDefinition('twig.loader.filesystem', $loader); } + if ($container->has('assets.packages')) { + $loader->addTag('twig.extension'); + } + if (method_exists('Symfony\Bridge\Twig\AppVariable', 'setContainer')) { // we are on Symfony <3.0, where the setContainer method exists $container->getDefinition('twig.app_variable')->addMethodCall('setContainer', array(new Reference('service_container'))); diff --git a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml index 83bb14735d..5c84d25059 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml +++ b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml @@ -86,7 +86,6 @@ -