Skip to content

Commit b01ebf7

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

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
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 & 1 deletion
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

@@ -63,7 +65,9 @@ public function loadConfiguration()
6365
->setFactory(Latte\Engine::class)
6466
->addSetup('setTempDirectory', [$this->tempDir])
6567
->addSetup('setAutoRefresh', [$this->debugMode])
66-
->addSetup('setStrictTypes', [$config->strictTypes]);
68+
->addSetup('setStrictTypes', [$config->strictTypes])
69+
->addSetup('setStrictParsing', [$config->strictParsing])
70+
->addSetup('enablePhpLinter', [$config->phpLinter]);
6771

6872
if (version_compare(Latte\Engine::VERSION, '3', '<')) {
6973
$latteFactory->addSetup('setContentType', [$config->xhtml ? Latte\Compiler::CONTENT_XHTML : Latte\Compiler::CONTENT_HTML]);

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)