Я недавно обновил свой проект Symfony с 2.4 до 2.8 и теперь 3.4.
Я получаю эту ошибку после входа в систему и перенаправления на следующую страницу.
Вот следы стека
ReflectionException:
Function () does not exist
at vendor\twig\twig\lib\Twig\Node\Expression\Call.php:288
at ReflectionFunction->__construct('')
(vendor\twig\twig\lib\Twig\Node\Expression\Call.php:288)
at Twig_Node_Expression_Call->reflectCallable(null)
(vendor\twig\twig\lib\Twig\Node\Expression\Call.php:23)
at Twig_Node_Expression_Call->compileCallable(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Node\Expression\Function.php:35)
at Twig_Node_Expression_Function->compile(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Compiler.php:84)
at Twig_Compiler->subcompile(object(Twig_Node_Expression_Function))
(vendor\twig\twig\lib\Twig\Node\Expression\Call.php:87)
at Twig_Node_Expression_Call->compileArguments(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Node\Expression\Call.php:47)
at Twig_Node_Expression_Call->compileCallable(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Node\Expression\Filter.php:32)
at Twig_Node_Expression_Filter->compile(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Compiler.php:84)
at Twig_Compiler->subcompile(object(Twig_Node_Expression_Filter))
(vendor\twig\twig\lib\Twig\Node\Print.php:30)
at Twig_Node_Print->compile(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Node.php:82)
at Twig_Node->compile(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Node.php:82)
at Twig_Node->compile(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Compiler.php:84)
at Twig_Compiler->subcompile(object(Twig_Node_Body))
(vendor\twig\twig\lib\Twig\Node\Module.php:303)
at Twig_Node_Module->compileDisplay(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Node\Module.php:87)
at Twig_Node_Module->compileTemplate(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Node\Module.php:68)
at Twig_Node_Module->compile(object(Twig_Compiler))
(vendor\twig\twig\lib\Twig\Compiler.php:73)
at Twig_Compiler->compile(object(Twig_Node_Module))
(vendor\twig\twig\lib\Twig\Environment.php:552)
at Twig_Environment->compile(object(Twig_Node_Module))
(vendor\twig\twig\lib\Twig\Environment.php:565)
at Twig_Environment->compileSource(object(Twig_Source))
(vendor\twig\twig\lib\Twig\Environment.php:368)
at Twig_Environment->loadTemplate('COTerminalBundle:Layout:default.html.twig', null)
(vendor\twig\twig\lib\Twig\Template.php:330)
at Twig_Template->loadTemplate('COTerminalBundle:Layout:default.html.twig', 'COTerminalBundle:Summary:index.html.twig', 1)
(var\cache\dev\twig\97\978d5147bd01293cb764603fc7cd00b1c51d7a1412daae1c1f3c3d008dc092ac.php:15)
at __TwigTemplate_fc502452fd2cc771596800db9a055ed5aabb58f726f1c6aa2d28ccc6e1d17e2b->__construct(object(Twig_Environment))
(vendor\twig\twig\lib\Twig\Environment.php:397)
at Twig_Environment->loadTemplate('COTerminalBundle:Summary:index.html.twig')
(vendor\symfony\symfony\src\Symfony\Bridge\Twig\TwigEngine.php:125)
at Symfony\Bridge\Twig\TwigEngine->load('COTerminalBundle:Summary:index.html.twig')
(vendor\symfony\symfony\src\Symfony\Bridge\Twig\TwigEngine.php:49)
at Symfony\Bridge\Twig\TwigEngine->render('COTerminalBundle:Summary:index.html.twig', array('quotes' => object(SlidingPagination), 'form' => object(FormView), 'fromDateFormatted' => null, 'toDateFormatted' => null, 'quoteLinksEnabled' => true, 'takeoffLinksEnabled' => true))
(vendor\symfony\symfony\src\Symfony\Bundle\TwigBundle\TwigEngine.php:45)
at Symfony\Bundle\TwigBundle\TwigEngine->render('COTerminalBundle:Summary:index.html.twig', array('quotes' => object(SlidingPagination), 'form' => object(FormView), 'fromDateFormatted' => null, 'toDateFormatted' => null, 'quoteLinksEnabled' => true, 'takeoffLinksEnabled' => true))
(vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait.php:284)
at Symfony\Bundle\FrameworkBundle\Controller\Controller->render('COTerminalBundle:Summary:index.html.twig', array('quotes' => object(SlidingPagination), 'form' => object(FormView), 'fromDateFormatted' => null, 'toDateFormatted' => null, 'quoteLinksEnabled' => true, 'takeoffLinksEnabled' => true))
(src\CO\TerminalBundle\Controller\SummaryController.php:73)
at CO\TerminalBundle\Controller\SummaryController->indexAction(object(Request))
(vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:151)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php:200)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public\app_dev.php:24)
at require('C:\\xampp\\htdocs\\terminal\\public\\app_dev.php')
(vendor\symfony\symfony\src\Symfony\Bundle\WebServerBundle\Resources\router.php:42)
Когда я отследил его, переменная $ callable стала нулевой. Я не уверен, если это на ветке или на Symfony, ошибка.
Edit:
Вот мой default.html.twig
{{ checkUserPageAccess() }}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>{% block title %}SAMSS{% endblock %}</title>
{% include 'COTerminalBundle:Layout:fullIncludes.html.twig' %}
</head>
<body>
<div class='row'>
<div class='twelve columns'>
<header>
<div class='row'>
<div class='two columns'>
<img src='{{ asset('bundles/coterminal/images/samss/landscape.png') }}' />
</div>
<div class='two columns'>
<h1 class='location-header'>{{ local_name }}</h1>
</div>
<div class='five columns'>
<div class='header-search-div'>
{% if checkUserAccess('takeofflist') %}
<a class='button radius small' href="{{ path('COTerminal_Takeoff_New') }}">Takeoff</a>
{% endif %}
{% if checkUserAccess('quotelist/quotes') %}
<a class='button radius small' href="{{ path('COTerminal_Quote_New') }}">Quote</a>
{% endif %}
{% if checkUserAccess('salesorders/salesorder') %}
<a class='button blue radius small' href="{{ path('COTerminalBundle_SalesOrder_New') }}">Sales Order</a>
{% endif %}
{% if checkUserAccess('projectlist') %}
<a class='button blue radius small' href="{{ path('COTerminal_Project_New') }}">Project</a>
{% endif %}
{% if checkUserAccess('salesorders/salesorder') %}
<a class='button yellow radius small' href="{{ path('COTerminalBundle_SalesOrder_NewStockOrder') }}">Stock Order</a>
{% endif %}
</div>
</div>
<div class='three columns'>
{% include 'COTerminalBundle:Layout:logoutPanel.html.twig' %}
</div>
</div>
</header>
<div class='row'>
<div class='twelve columns'>
{{ knp_menu_render('main', {'currentClass':'active'}) }}
{% block body %}
{% endblock %}
</div>
</div>
</div>
</div>
<script>
$(document).foundationAccordion();
</script>
</body>
</html>