aura / view
Provides an implementation of the TemplateView and TwoStepView patterns, with support for helpers and for closures as templates, using PHP itself as the templating language.
Requires
- php: >=5.4.0
Requires (Dev)
- aura/di: ~2.0
- yoast/phpunit-polyfills: ~1.0
This package is auto-updated.
Last update: 2026-07-23 17:43:29 UTC
README
Provides an implementation of the TemplateView and TwoStepView patterns using PHP itself as the templating language. It supports both file-based and closure-based templates along with helpers and sections.
It is preceded by systems such as
Savant,
Zend_View, and
Solar_View.
Foreword
Installation
This library requires PHP 8.4 or later. It has no runtime dependencies -- not even an escaper, by design; see Escaping Output.
It is installable and autoloadable via Composer as aura/view.
Alternatively, download a release or clone this repository, then require or include its autoload.php file.
Upgrading from 2.x? See Upgrading from 2.x.
Quality
To run the unit tests at the command line, issue composer install and then vendor/bin/phpunit at the package root. This requires Composer to be available as composer.
Static analysis is via PHPStan; composer phpstan runs the suite's level, and src/ is clean at level 9.
This library attempts to comply with PSR-1, PSR-12, and PSR-4.
Community
To ask questions, provide feedback, or otherwise communicate with the Aura community, please join our Google Group, or follow @auraphp on X.
Documentation
This package is fully documented here.