File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 22
33namespace Admingenerator \GeneratorBundle \Twig \TokenParser ;
44
5- use Twig \Error \ SyntaxError ;
5+ use Twig \Environment ;
66use Twig \Node \EmptyNode ;
77use Twig \Node \Expression \ConstantExpression ;
88use Twig \Node \Node ;
@@ -24,7 +24,11 @@ public function parse(Token $token): ?Node
2424
2525 $ path = "Admingenerated/ $ bundle/Resources/views/ $ folder/ $ file " ;
2626
27- $ this ->parser ->getExpressionParser ()->parseExpression ();
27+ if (Environment::VERSION_ID < 32100 ) { // BC
28+ $ this ->parser ->getExpressionParser ()->parseExpression ();
29+ } else {
30+ $ this ->parser ->parseExpression ();
31+ }
2832
2933 $ this ->parser ->setParent (new ConstantExpression ($ path ,$ token ->getLine ()));
3034 $ this ->parser ->getStream ()->expect (Token::BLOCK_END_TYPE );
You can’t perform that action at this time.
0 commit comments