Yii View Rendering Library

3.0.1 2021-09-18 20:31 UTC

This package is auto-updated.

Last update: 2021-09-18 20:31:36 UTC



Yii View Rendering Library

Latest Stable Version Total Downloads Build Status Code Coverage Scrutinizer Quality Score Mutation testing badge static analysis type-coverage

This library provides templates rendering abstraction supporting layout-view-subview hierarchy, custom renderers with PHP-based as default and more. It is used in Yii Framework but is supposed to be usable separately.


  • PHP 7.4 or higher.


The package could be installed via composer:

composer require yiisoft/view --prefer-dist

General usage

The package provides two use cases for managing view templates:


  • yiisoft/yii-view - a wrapper that is used in Yii Framework. Adds additional functionality for a WEB environment and compatibility with PSR-7 interfaces.
  • yiisoft/view-twig - an extension that provides a view renderer that will allow you to use the Twig view template engine, instead of the default PHP renderer.


Unit testing

The package is tested with PHPUnit. To run tests:


Mutation testing

The package tests are checked with Infection mutation framework with Infection Static Analysis Plugin. To run it:


Static analysis

The code is statically analyzed with Psalm. To run static analysis:



The Yii View Rendering Library is free software. It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Software.

Support the project

Open Collective

Follow updates

Official website Twitter Telegram Facebook Slack