I have a twig template using Symfony3 like the follwing:
{% if app.environment == 'dev' %}
{{ dump(students) }}
{% endif %}
But in the 'prod' environment it throws this error, shown in the var/logs/prod.log file:
[2016-05-18 21:28:28] request.CRITICAL: Uncaught PHP Exception Twig_Error_Syntax: "Unknown "dump" function in "search/search_pet_results.html.twig" at line 13." at /var/www/html/petition/vendor/twig/twig/lib/Twig/ExpressionParser.php line 573 {"exception":"[object] (Twig_Error_Syntax(code: 0): Unknown \"dump\" function in \"search/search_pet_results.html.twig\" at line 13. at /var/www/html/petition/vendor/twig/twig/lib/Twig/ExpressionParser.php:573)"} []
Any suggestions for my twig template? Don't know what to try, because this is "supposed" to work.
<p>Application Environment: {{ app.environment }}</p>
in my twig file, it shows "Application Environment: dev" for my "app_dev.php" link, and for my regular prod environment it shows "Application Environment: prod". – Alvin Bunk