Closed foaly-nr1 closed 6 years ago
Hi,
sorry for this late reply. Symfony 2.7.0 requires twig ~1.18. The bridge (posted link) requires ~1.20. Both versions are higher than 1.5. I'm not able to reproduce this error. Can you check which version of twig is installed by looking into composer.lock?
Best regards Florian
I have the same issue in my production environment. Symfony v2.6.10
, Twig v1.18.2
, GuzzleBundle v4.2.1
.
This is because twig only loads the debug extension (with dump
function) in debug mode. Run this with empty cache (rm -fr app/cache/prod
) to confirm:
app/console assetic:dump --no-debug --env=prod
The problem is, that the method Dump is only available in environments with enabled debugging.
So in production, the dump method is not available.
see http://twig.sensiolabs.org/doc/functions/dump.html
The dump function is not available by default. You must add the Twig_Extension_Debug extension explicitly when creating your Twig environment:
Maybe we should write a custom twig function that uses the var_dump function with enabled debugging.
Yes, this could be a solution!
Reviving this thread: I wonder what's the point of having debug stuff available when you're warming up a non-debug cache. Couldn't we just "exclude" that when the kernel debug flag is set to false?
@foaly-nr1 @mlebkowski @sebastianblum @asprega fixed in PR #164
Released in v7.3.0 (https://github.com/8p/EightPointsGuzzleBundle/releases/tag/7.3.0)
When warming up the cache, assetic is throwing the following error:
assetic.ERROR: The template "GuzzleBundle::profiler.html.twig" contains an error: The function "dump" does not exist in "GuzzleBundle::profiler.html.twig" at line 47
This is because dump was introduced in added in Twig 1.5 and Symfony 2.7 seems to be using Twig 1.2.