diff --git a/composer.json b/composer.json index 489e16e..9e03d76 100644 --- a/composer.json +++ b/composer.json @@ -76,7 +76,7 @@ "yiisoft/router-fastroute": "^3.0", "yiisoft/translator": "^3.0", "yiisoft/translator-message-php": "^1.1", - "yiisoft/view": "^8.0", + "yiisoft/view": "^10.0", "yiisoft/yii-console": "^2.0", "yiisoft/yii-debug": "dev-master|dev-php80", "yiisoft/yii-event": "^2.0", @@ -84,7 +84,7 @@ "yiisoft/yii-middleware": "^1.0", "yiisoft/yii-runner-console": "^2.0", "yiisoft/yii-runner-http": "^2.0", - "yiisoft/yii-view": "^6.0" + "yiisoft/yii-view-renderer": "^7.1" }, "require-dev": { "codeception/c3": "^2.7", diff --git a/config/common/params.php b/config/common/params.php index f220a7a..b02de7a 100644 --- a/config/common/params.php +++ b/config/common/params.php @@ -10,7 +10,7 @@ use Yiisoft\Router\CurrentRoute; use Yiisoft\Router\UrlGeneratorInterface; use Yiisoft\Translator\TranslatorInterface; -use Yiisoft\Yii\View\CsrfViewInjection; +use Yiisoft\Yii\View\Renderer\CsrfViewInjection; return [ 'app' => [ @@ -39,7 +39,9 @@ ], ], - 'yiisoft/yii-view' => [ + 'yiisoft/yii-view-renderer' => [ + 'viewPath' => '@views', + 'layout' => '@layout/main.php', 'injections' => [ Reference::to(CommonViewInjection::class), Reference::to(CsrfViewInjection::class), diff --git a/src/Controller/SiteController.php b/src/Controller/SiteController.php index 295d7bb..89ae541 100644 --- a/src/Controller/SiteController.php +++ b/src/Controller/SiteController.php @@ -5,7 +5,7 @@ namespace App\Controller; use Psr\Http\Message\ResponseInterface; -use Yiisoft\Yii\View\ViewRenderer; +use Yiisoft\Yii\View\Renderer\ViewRenderer; final class SiteController { diff --git a/src/Handler/NotFoundHandler.php b/src/Handler/NotFoundHandler.php index 7ea69e3..726ec4f 100644 --- a/src/Handler/NotFoundHandler.php +++ b/src/Handler/NotFoundHandler.php @@ -10,7 +10,7 @@ use Yiisoft\Http\Status; use Yiisoft\Router\UrlGeneratorInterface; use Yiisoft\Router\CurrentRoute; -use Yiisoft\Yii\View\ViewRenderer; +use Yiisoft\Yii\View\Renderer\ViewRenderer; final class NotFoundHandler implements RequestHandlerInterface { diff --git a/src/ViewInjection/CommonViewInjection.php b/src/ViewInjection/CommonViewInjection.php index 2ef020e..cbe8390 100644 --- a/src/ViewInjection/CommonViewInjection.php +++ b/src/ViewInjection/CommonViewInjection.php @@ -5,7 +5,7 @@ namespace App\ViewInjection; use App\ApplicationParameters; -use Yiisoft\Yii\View\CommonParametersInjectionInterface; +use Yiisoft\Yii\View\Renderer\CommonParametersInjectionInterface; use Yiisoft\Router\UrlGeneratorInterface; final class CommonViewInjection implements CommonParametersInjectionInterface diff --git a/src/ViewInjection/LayoutViewInjection.php b/src/ViewInjection/LayoutViewInjection.php index 38978d4..f0392ca 100644 --- a/src/ViewInjection/LayoutViewInjection.php +++ b/src/ViewInjection/LayoutViewInjection.php @@ -8,7 +8,7 @@ use Yiisoft\Assets\AssetManager; use Yiisoft\I18n\Locale; use Yiisoft\Router\CurrentRoute; -use Yiisoft\Yii\View\LayoutParametersInjectionInterface; +use Yiisoft\Yii\View\Renderer\LayoutParametersInjectionInterface; final class LayoutViewInjection implements LayoutParametersInjectionInterface { diff --git a/src/ViewInjection/TranslatorViewInjection.php b/src/ViewInjection/TranslatorViewInjection.php index d2b3ff6..d84e17e 100644 --- a/src/ViewInjection/TranslatorViewInjection.php +++ b/src/ViewInjection/TranslatorViewInjection.php @@ -5,7 +5,7 @@ namespace App\ViewInjection; use Yiisoft\Translator\TranslatorInterface; -use Yiisoft\Yii\View\CommonParametersInjectionInterface; +use Yiisoft\Yii\View\Renderer\CommonParametersInjectionInterface; final class TranslatorViewInjection implements CommonParametersInjectionInterface {