Reputation: 69
I encountered the following error when I tried to generate a new bundle with Symfony:
Unknown "raw" tag
Symfony details:
"require": {
"php": ">=5.3.9",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/orm": "^2.4.8",
"gregwar/image-bundle": "^2.1",
"incenteev/composer-parameter-handler": "~2.0",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/assetic-bundle": "~2.3",
"symfony/monolog-bundle": "^3.0.2",
"symfony/swiftmailer-bundle": "~2.3,>=2.3.10",
"symfony/symfony": "2.7.*",
"twig/twig": "^1.0||^2.0",
"whiteoctober/breadcrumbs-bundle": "*",
"friendsofsymfony/user-bundle": "~2.0.1"
},
"require-dev": {
"sensio/generator-bundle": "~2.3",
"symfony/phpunit-bridge": "~2.7"
}
Upvotes: 1
Views: 1414
Reputation:
If you use the sensio/generator-bundle
: Just remove it from composer.json and run composer require sensio/generator-bundle
to get the correct version.
Why? This bundle uses the {% raw %}
tag.
Upvotes: 0
Reputation: 1760
In the new version of Twig tag raw
had been removed. You should use verbatim
tag instead. Proof - https://github.com/twigphp/Twig/blob/1.x/lib/Twig/Lexer.php#L302.
So, just search for {% raw %}
tag in your twig files and replace it with {% verbatim %}
.
Then search for {% endraw %}
and replace it with {% endverbatim %}
.
Upvotes: 2