Skip to content

Commit 85e0340

Browse files
committed
LatteExtension: added options strictParsing & phpLinter
1 parent fc1ff9b commit 85e0340

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"nette/di": "<3.0.7",
4343
"nette/forms": "<3.0",
4444
"nette/schema": "<1.2",
45-
"latte/latte": "<2.7.1 || >=3.0.0 <3.0.5 || >=3.1",
45+
"latte/latte": "<2.7.1 || >=3.0.0 <3.0.8 || >=3.1",
4646
"tracy/tracy": "<2.5"
4747
},
4848
"autoload": {

src/Bridges/ApplicationDI/LatteExtension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public function getConfigSchema(): Nette\Schema\Schema
4444
'extensions' => Expect::arrayOf('string|Nette\DI\Definitions\Statement'),
4545
'templateClass' => Expect::string(),
4646
'strictTypes' => Expect::bool(false),
47+
'strictParsing' => Expect::bool(false),
48+
'phpLinter' => Expect::string(),
4749
]);
4850
}
4951

@@ -74,6 +76,9 @@ public function loadConfiguration()
7476
$this->addMacro($macro);
7577
}
7678
} else {
79+
$latteFactory->addSetup('setStrictParsing', [$config->strictParsing])
80+
->addSetup('enablePhpLinter', [$config->phpLinter]);
81+
7782
foreach ($config->extensions as $extension) {
7883
$this->addExtension($extension);
7984
}

src/Bridges/ApplicationLatte/Nodes/ControlNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
use Latte;
1313
use Latte\Compiler\Escaper;
14-
use Latte\Compiler\Nodes\Php\Expression\ArrayItemNode;
14+
use Latte\Compiler\Nodes\Php\ArrayItemNode;
1515
use Latte\Compiler\Nodes\Php\Expression\ArrayNode;
1616
use Latte\Compiler\Nodes\Php\ExpressionNode;
1717
use Latte\Compiler\Nodes\Php\ModifierNode;

0 commit comments

Comments
 (0)