@@ -68,7 +68,7 @@ public static function provideTests(): iterable
68
68
$ tests [] = [$ node , <<<EOF
69
69
// line 1
70
70
\$__internal_compile_0 = new \Twig\Runtime\LoopIterator( {$ itemsGetter });
71
- \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
71
+ yield from ( \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
72
72
\$macros = \$this->macros;
73
73
\$parent = \$context;
74
74
foreach ( \$iterator as \$context["key"] => \$context["item"]) {
@@ -77,8 +77,7 @@ public static function provideTests(): iterable
77
77
unset( \$context['key'], \$context['item']);
78
78
\$context = array_intersect_key( \$context, \$parent) + \$parent;
79
79
yield from [];
80
- };
81
- yield from \$__internal_compile_1( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
80
+ })( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
82
81
EOF
83
82
];
84
83
@@ -93,7 +92,7 @@ public static function provideTests(): iterable
93
92
$ tests [] = [$ node , <<<EOF
94
93
// line 1
95
94
\$__internal_compile_0 = new \Twig\Runtime\LoopIterator( {$ valuesGetter });
96
- \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
95
+ yield from ( \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
97
96
\$macros = \$this->macros;
98
97
\$parent = \$context;
99
98
\$context['loop'] = new \Twig\Runtime\LoopContext( \$iterator, \$parent, \$blocks, \$recurseFunc, \$depth);
@@ -103,8 +102,7 @@ public static function provideTests(): iterable
103
102
unset( \$context['k'], \$context['v'], \$context['loop']);
104
103
\$context = array_intersect_key( \$context, \$parent) + \$parent;
105
104
yield from [];
106
- };
107
- yield from \$__internal_compile_1( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
105
+ })( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
108
106
EOF
109
107
];
110
108
@@ -119,7 +117,7 @@ public static function provideTests(): iterable
119
117
$ tests [] = [$ node , <<<EOF
120
118
// line 1
121
119
\$__internal_compile_0 = new \Twig\Runtime\LoopIterator( {$ valuesGetter });
122
- \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
120
+ yield from ( \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
123
121
\$macros = \$this->macros;
124
122
\$parent = \$context;
125
123
\$context['loop'] = new \Twig\Runtime\LoopContext( \$iterator, \$parent, \$blocks, \$recurseFunc, \$depth);
@@ -129,8 +127,7 @@ public static function provideTests(): iterable
129
127
unset( \$context['k'], \$context['v'], \$context['loop']);
130
128
\$context = array_intersect_key( \$context, \$parent) + \$parent;
131
129
yield from [];
132
- };
133
- yield from \$__internal_compile_1( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
130
+ })( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
134
131
EOF
135
132
];
136
133
@@ -146,7 +143,7 @@ public static function provideTests(): iterable
146
143
$ tests [] = [$ node , <<<EOF
147
144
// line 1
148
145
\$__internal_compile_0 = new \Twig\Runtime\LoopIterator( {$ valuesGetter });
149
- \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
146
+ yield from ( \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
150
147
\$macros = \$this->macros;
151
148
\$parent = \$context;
152
149
\$context['loop'] = new \Twig\Runtime\LoopContext( \$iterator, \$parent, \$blocks, \$recurseFunc, \$depth);
@@ -161,8 +158,7 @@ public static function provideTests(): iterable
161
158
unset( \$context['k'], \$context['v'], \$context['loop']);
162
159
\$context = array_intersect_key( \$context, \$parent) + \$parent;
163
160
yield from [];
164
- };
165
- yield from \$__internal_compile_1( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
161
+ })( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
166
162
EOF
167
163
];
168
164
@@ -173,7 +169,7 @@ public static function provideTests(): iterable
173
169
$ tests [] = [$ node , <<<EOF
174
170
// line 1
175
171
\$__internal_compile_0 = new \Twig\Runtime\LoopIterator( {$ itemsGetter });
176
- \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
172
+ yield from ( \$__internal_compile_1 = function ( \$iterator, & \$context, \$blocks, \$recurseFunc, \$depth) {
177
173
\$macros = \$this->macros;
178
174
\$parent = \$context;
179
175
\$context['loop'] = new \Twig\Runtime\LoopContext( \$iterator, \$parent, \$blocks, \$recurseFunc, \$depth);
@@ -183,8 +179,7 @@ public static function provideTests(): iterable
183
179
unset( \$context['_key'], \$context['item'], \$context['loop']);
184
180
\$context = array_intersect_key( \$context, \$parent) + \$parent;
185
181
yield from [];
186
- };
187
- yield from \$__internal_compile_1( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
182
+ })( \$__internal_compile_0, \$context, \$blocks, \$__internal_compile_1, 0);
188
183
EOF
189
184
, $ env ];
190
185
0 commit comments