You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a new Symfony project and added Twig. I also added an external Bundle that use the syntax FooBarBundle::template.html.twig and I got this exception:
Unable to find template "FooBarBundle::template.html.twig" (looked into: /srv/templates, /srv/templates).
Possible Solution
If the not found template contains : and symfony/templating is not installed, display a different error message explaining the user that they must install symfony/templating.
The text was updated successfully, but these errors were encountered:
javiereguiluz
added
the
DX
DX = Developer eXperience (anything that improves the experience of using Symfony)
label
Jun 1, 2018
I would recommend to fix the third party bundle. Adding symfony/templating would work of course, but that comes with a performance penalty and this is not a long term solution. I agree though that a better error message would be nice.
…noushnorouzi)
This PR was merged into the 4.2-dev branch.
Discussion
----------
[TwigBundle] Enhance the twig not found exception
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27468
| License | MIT
| Doc PR | -
Improve error message to make it clear to developers what mistake they have made.
Commits
-------
32988b4 Enhance the twig not found exception
Description
As reported on Symfony Docs (symfony/symfony-docs#9867):
Possible Solution
If the not found template contains
:
andsymfony/templating
is not installed, display a different error message explaining the user that they must install symfony/templating.The text was updated successfully, but these errors were encountered: