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 2
2
3
3
namespace Admingenerator \GeneratorBundle \Twig \TokenParser ;
4
4
5
- use Twig \Error \ SyntaxError ;
5
+ use Twig \Environment ;
6
6
use Twig \Node \EmptyNode ;
7
7
use Twig \Node \Expression \ConstantExpression ;
8
8
use Twig \Node \Node ;
@@ -24,7 +24,11 @@ public function parse(Token $token): ?Node
24
24
25
25
$ path = "Admingenerated/ $ bundle/Resources/views/ $ folder/ $ file " ;
26
26
27
- $ this ->parser ->getExpressionParser ()->parseExpression ();
27
+ if (Environment::VERSION_ID < 32100 ) { // BC
28
+ $ this ->parser ->getExpressionParser ()->parseExpression ();
29
+ } else {
30
+ $ this ->parser ->parseExpression ();
31
+ }
28
32
29
33
$ this ->parser ->setParent (new ConstantExpression ($ path ,$ token ->getLine ()));
30
34
$ this ->parser ->getStream ()->expect (Token::BLOCK_END_TYPE );
You can’t perform that action at this time.
0 commit comments