Skip to content

Commit fa6eb89

Browse files
committed
latte 3.1.4
1 parent ae2f9b9 commit fa6eb89

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
"require-dev": {
2222
"nette/tester": "^2.6",
2323
"nette/di": "^3.1 || ^4.0",
24-
"latte/latte": "^3.0.12",
24+
"latte/latte": "^3.1.4",
2525
"tracy/tracy": "^2.9",
2626
"psr/simple-cache": "^2.0 || ^3.0",
2727
"phpstan/phpstan": "^2.1.40@stable",
2828
"phpstan/extension-installer": "^1.4@stable",
2929
"nette/phpstan-rules": "^1.0"
3030
},
3131
"conflict": {
32-
"latte/latte": "<3.0.12"
32+
"latte/latte": "<3.1.4"
3333
},
3434
"suggest": {
3535
"ext-pdo_sqlite": "to use SQLiteStorage or SQLiteJournal"

src/Bridges/CacheLatte/Nodes/CacheNode.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Latte\Compiler\Nodes\AreaNode;
1111
use Latte\Compiler\Nodes\Php\Expression\ArrayNode;
1212
use Latte\Compiler\Nodes\StatementNode;
13-
use Latte\Compiler\Position;
1413
use Latte\Compiler\PrintContext;
1514
use Latte\Compiler\Tag;
1615

@@ -22,16 +21,14 @@ class CacheNode extends StatementNode
2221
{
2322
public ArrayNode $args;
2423
public AreaNode $content;
25-
public ?Position $endLine;
2624

2725

2826
/** @return \Generator<int, ?list<string>, array{AreaNode, ?Tag}, static> */
2927
public static function create(Tag $tag): \Generator
3028
{
3129
$node = $tag->node = new static;
3230
$node->args = $tag->parser->parseArguments();
33-
[$node->content, $endTag] = yield;
34-
$node->endLine = $endTag?->position;
31+
[$node->content] = yield;
3532
return $node;
3633
}
3734

@@ -55,7 +52,7 @@ public function print(PrintContext $context): string
5552
$this->args,
5653
$this->position,
5754
$this->content,
58-
$this->endLine,
55+
end($this->tagRanges),
5956
);
6057
}
6158

tests/Bridges.Latte3/{cache}.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require __DIR__ . '/../bootstrap.php';
1111

1212

1313
$latte = new Latte\Engine;
14-
$latte->setTempDirectory(getTempDir());
14+
$latte->setCacheDirectory(getTempDir());
1515
$latte->addExtension(new CacheExtension(new Nette\Caching\Storages\MemoryStorage));
1616

1717
$params['title'] = 'Hello';

0 commit comments

Comments
 (0)