I'm trying to active the Twig StringLoader Extension in a Symfony 2.3 project but just can't get the yaml-syntax right.
This post refers to the answer by Heyflynn on a post dealing with the exact same problem but providing a solution that just does not work (for me).
Writing the following lines in my app/config/config.yml just gives me the exception below:
# app/config/config.yml
acme.twig.extension.loader:
class: Twig_Extension_StringLoader
tags:
- { name: 'twig.extension' }
Gives me this:
FileLoaderLoadException: Cannot import resource ".../app/config/config.yml" from ".../app/config/config_dev.yml". (There is no extension able to load the configuration for "acme.twig.extension.loader" (in .../app/config/config.yml). Looked for namespace "acme.twig.extension.loader", found "framework", "security", "twig", "monolog", "swiftmailer", "assetic", "doctrine", "sensio_framework_extra", "apy_data_grid", "project", "acme_demo", "web_profiler", "sensio_distribution")
(I was already wondering about the acme appearence in acme.twig.extension.loader and replaced it with the name of the project bundle but that gives me the same exception again. Just cutting it off doesnt work either.)
Please help!