Skip to content

Commit 0f865a8

Browse files
committed
composer: allows nette/utils 4.0
1 parent 1be2a25 commit 0f865a8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"nette/component-model": "^3.0",
2020
"nette/http": "^3.0.2",
2121
"nette/routing": "^3.0.2",
22-
"nette/utils": "^3.2.1"
22+
"nette/utils": "^3.2.1 || ~4.0.0"
2323
},
2424
"suggest": {
2525
"nette/forms": "Allows to use Nette\\Application\\UI\\Form",

src/Bridges/ApplicationDI/LatteExtension.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ public function loadConfiguration()
6666
->addSetup('setStrictTypes', [$config->strictTypes]);
6767

6868
if (version_compare(Latte\Engine::VERSION, '3', '<')) {
69-
$latteFactory
70-
->addSetup('setContentType', [$config->xhtml ? Latte\Compiler::CONTENT_XHTML : Latte\Compiler::CONTENT_HTML])
71-
->addSetup('Nette\Utils\Html::$xhtml = ?', [$config->xhtml]);
69+
$latteFactory->addSetup('setContentType', [$config->xhtml ? Latte\Compiler::CONTENT_XHTML : Latte\Compiler::CONTENT_HTML]);
70+
if ($config->xhtml) {
71+
$latteFactory->addSetup('Nette\Utils\Html::$xhtml = ?', [true]);
72+
}
7273
foreach ($config->macros as $macro) {
7374
$this->addMacro($macro);
7475
}

0 commit comments

Comments
 (0)