WouterJEloquentBundle
WouterJEloquentBundle copied to clipboard
Warning in service wiring because of missing "Twig_Environment"
I use Symfony Framerowk but no Twig, so I get this warning:
Warning: Class "Twig_Environment" not found in .../vendor/wouterj/eloquent-bundle/src/Twig/SqlFormatterExtension.php on line 18
The above-mentioned SqlFormatterExtension
should be wired only if there is a presence of Twig being detected first.
No need for this in applications that don't have HTML rendering.\
Using the latest version 2.2.1
Hi! Can you share in which scenario you get this warning? The service should not be used when there is no WebProfilerBundle (and this bundle requires Twig to be installed), and unused services don't produce warnings IIRC.
As a test, I just did this and got no warning:
symfony new reproducer
cd reproducer/
composer require wouterj/eloquent-bundle
bin/console lint:container
@wouterj the lint:container
doesn't show anything unusual, but when you run bin/console debug:container --no-debug --format=json
you get the fatal error.
@wouterj any solutions for this?! I still get it on v2.3.