- Block can now reference a 'this' object from it's {% using [ 'this' => new stdClass() ] %} token

- Fixed a bug with {% use %} which was buggy whenever two uses were declared and one of them had a curly braces notation in it.
This commit is contained in:
Dave Mc Nicoll committed 2024-10-21 18:09:33 +00:00
1 parent 7970679894
commit 35a7bd4cf7
3 files changed
+8 -3

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ abstract class Context {
public function renderUses() : string
{
return implode(",", $this->useStack ?? []);
return implode(PHP_EOL, array_map(fn($use) => "use $use;", $this->useStack ?? []));
}
public function renderFunctions() : string