From 31cf69a11a860cb0fe48f16d4cdc779d036ff15c Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Mon, 1 Jul 2024 13:33:23 +0300 Subject: [PATCH] Raise required `yiisoft/view` version to `^10.0` (#122) --- CHANGELOG.md | 4 ++-- composer.json | 2 +- src/ViewRenderer.php | 2 +- tests/views/nested-layout/layout.php | 2 +- tests/views/nested/nested-1.php | 2 +- tests/views/nested/root.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34f7be0..5c994f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Yii View Renderer Change Log -## 7.0.1 under development +## 7.1.0 under development -- no changes in this release. +- Chg #122: Raise required `yiisoft/view` version to `^10.0` (@vjik) ## 7.0.0 June 22, 2024 diff --git a/composer.json b/composer.json index 6d02030..0d20dcf 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "yiisoft/friendly-exception": "^1.0", "yiisoft/html": "^2.5|^3.0", "yiisoft/strings": "^2.0", - "yiisoft/view": "^9.0" + "yiisoft/view": "^10.0" }, "require-dev": { "httpsoft/http-message": "^1.0", diff --git a/src/ViewRenderer.php b/src/ViewRenderer.php index f6205a3..2845f8d 100644 --- a/src/ViewRenderer.php +++ b/src/ViewRenderer.php @@ -342,7 +342,7 @@ private function renderProxy( return $currentView ->setParameters($layoutParameters) - ->renderFile($layout, ['content' => $content]); + ->render($layout, ['content' => $content]); } /** diff --git a/tests/views/nested-layout/layout.php b/tests/views/nested-layout/layout.php index dda4d20..abc5413 100644 --- a/tests/views/nested-layout/layout.php +++ b/tests/views/nested-layout/layout.php @@ -10,7 +10,7 @@ $this->beginPage(); echo ''; -echo $this->render('head'); +echo $this->render('./head'); echo ''; echo '

' . $title . '

'; echo $content; diff --git a/tests/views/nested/nested-1.php b/tests/views/nested/nested-1.php index 8590794..493ef54 100644 --- a/tests/views/nested/nested-1.php +++ b/tests/views/nested/nested-1.php @@ -7,4 +7,4 @@ * @var string $name */ -echo($label ?? 'nested-1') . ': ' . $name . '. ' . $this->render('nested-2'); +echo($label ?? 'nested-1') . ': ' . $name . '. ' . $this->render('./nested-2'); diff --git a/tests/views/nested/root.php b/tests/views/nested/root.php index 1da7c82..eced3fa 100644 --- a/tests/views/nested/root.php +++ b/tests/views/nested/root.php @@ -8,4 +8,4 @@ * @var string $label */ -echo $label . ': ' . $name . '. ' . $this->render('nested-1'); +echo $label . ': ' . $name . '. ' . $this->render('./nested-1');