Closed quentin-st closed 6 years ago
Do you have Twig enabled?
Sure I do! That's on a fresh Symfony 3.4 install
I've just upgraded my project from 3.3.x to 3.4.1 and bundle works fine with some deprecation notes.
Probably you're talking about different Symfony 3.4: Symfony SE vs Symfony Flex?
I'm using "classic" Symfony.
@chteuchteu Does a debug:container
list the templating service?
Symfony SE here - running php bin/console debug:container templating
outputs this:
Select one of the following services to display its information:
[0] templating.helper.logout_url
[1] templating.helper.security
>
Something must be missing in your setup:
$ php bin/console debug:container templating
// This service is an alias for the service templating.engine.twig
Information for Service "templating.engine.twig"
================================================
---------------- --------------------------------------
Option Value
---------------- --------------------------------------
Service ID templating.engine.twig
Class Symfony\Bundle\TwigBundle\TwigEngine
Tags -
Public no
Synthetic no
Lazy no
Shared yes
Abstract no
Autowired no
Autoconfigured no
---------------- --------------------------------------
Have you checked the deps in your composer file?
Yes indeed, I don't know what though
Here are my dependencies:
"require": {
"php": ">=7.1",
"cocur/slugify": "^3.0",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"presta/sitemap-bundle": "^1.5",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/symfony": "3.4.*",
"twig/twig": "^1.0||^2.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"phpunit/phpunit": "^6.0",
"symfony/phpunit-bridge": "^3.0"
},
Am I missing something?
Steps to reproduce:
symfony new wob 3.4 && cd wob
composer require whiteoctober/breadcrumbs-bundle
vim app/AppKernel.php # add "new WhiteOctober\BreadcrumbsBundle\WhiteOctoberBreadcrumbsBundle(),"
vim app/config/config.yml # add "white_october_breadcrumbs: ~"
php bin/console cache:clear
Here's the output:
In CheckExceptionOnInvalidReferenceBehaviorPass.php line 32:
The service "white_october_breadcrumbs.helper" has a dependency on a non-existent
service "templating".
PR #84 might help here?
Set templating in config/packages/framework.yaml then no more errors for me.
framework:
templating: { engines: [twig] }
Registering this bundle in a Symfony 3.4 project triggers the following exception:
Is there any known workaround?