File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1111use Twig \Compiler ;
1212use Twig \Extension \SandboxExtension ;
1313use Twig \Node \Expression \GetAttrExpression ;
14- use Twig \Node \Expression \SupportDefinedTestTrait ;
1514use Twig \Node \Node ;
1615use Twig \Template ;
1716
2423 */
2524class GetAttrNode extends GetAttrExpression
2625{
27- use SupportDefinedTestTrait;
28-
2926 /**
3027 * @param array $nodes An array of named nodes
3128 * @param array $attributes An array of attributes (should not be nodes)
@@ -53,7 +50,7 @@ public function compile(Compiler $compiler): void
5350 if (
5451 $ this ->getAttribute ('optimizable ' )
5552 && (!$ env ->isStrictVariables () || $ this ->getAttribute ('ignore_strict_check ' ))
56- && !$ this ->definedTest
53+ && !$ this ->isDefinedTestEnabled () // DIFF: $this-> definedTest is private
5754 && Template::ARRAY_CALL === $ this ->getAttribute ('type ' )
5855 ) {
5956 $ var = '$ ' . $ compiler ->getVarName ();
@@ -113,7 +110,7 @@ public function compile(Compiler $compiler): void
113110
114111 $ compiler ->raw (', ' )
115112 ->repr ($ this ->getAttribute ('type ' ))
116- ->raw (', ' )->repr ($ this ->definedTest )
113+ ->raw (', ' )->repr ($ this ->isDefinedTestEnabled ()) // DIFF: $this->definedTest is private
117114 ->raw (', ' )->repr ($ this ->getAttribute ('ignore_strict_check ' ))
118115 ->raw (', ' )->repr ($ env ->hasExtension (SandboxExtension::class))
119116 ->raw (', ' )->repr ($ this ->getNode ('node ' )->getTemplateLine ())
You can’t perform that action at this time.
0 commit comments