My config.yml
is as follows:
imports:
- { resource: parameters.yml }
- { resource: security.yml }
framework:
#translator: { fallback: %locale% }
secret: %secret%
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
templating:
engines: ['twig']
#assets_version: SomeVersionScheme
default_locale: "%locale%"
trusted_proxies: ~
session: ~
fragments: ~
http_method_override: true
I get an error:
'The service definition "templating.engine.twig" does not exist.'
But the Twig extension is in the /vendor/twig
folder. What more do I have to change to make it work?
You have to register the TwigBundle and also configure it. An example can be seen in the Symfony Standard edition:
app/config/config.yml
:app/AppKernel.php
: