Symfony2 the template does not support the "bundle" parameter Symfony2 the template does not support the "bundle" parameter php php

Symfony2 the template does not support the "bundle" parameter


The following syntax doesn't work any-more with Symfony 2.6.3 and its default requirements.

If you want to stay with Symfony 2.6.3 without changing the assetic requirement (using dev-master in production is never a good idea...)

Change (@xxx):

{% extends '@MyBundle/layout.html.twig' %}

To:

{% extends 'MyBundle::layout.html.twig' %}

Or stay with Symfony 2.6.3 and use the dev-master requirement of the assetic-bundle as suggested in the accepted answer.

Or switch back to Symfony 2.6.1, I suppose this issue (and the assetic requirement) will be fixed in Symfony 2.6.4.

Check out the issue on Github.


You need to update your composer.json as follows:

    "symfony/symfony": "~2.6",    "symfony/assetic-bundle": "dev-master",

The error comes from assetic in version 2.5.0. The dev version corrects this as explained here:https://github.com/Spea/SpBowerBundle/issues/119


If you are trying to include base.html.twig from one of your templates like this:

{% extends 'base.html.twig' %}

You need to change it to this:

{% extends '::base.html.twig' %}

More information here.