Search by

pieceofcake2 / twig-view

ttsurupieceofcake2

Twig 3 template engine for CakePHP 2 views

Package info

github.com/pieceofcake2/twig-view

Type:cakephp-plugin

pkg:composer/pieceofcake2/twig-view

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

v2.0.6 2026-10-16 08:34 UTC

README

GitHub License Packagist Version PHP CakePHP PHPStan Twig CI Codecov

pieceofcake2/twig-view integrates the Twig Templating Language (Twig 3.x) with CakePHP 2, providing access to helpers, elements and themes from Twig templates. It is a modernized fork of predominant/TwigView with PSR-4 namespaces and PHP 8.1+ support.

Note

For CakePHP 5.x, use the official cakephp/twig-view package instead.

Documentation

The Markdown documentation is also included in the Composer package, in the plugin's directory: plugins/TwigView/docs/README.md (the location depends on your installer-paths). Install the package with --dev if you only need it for development.

Requirements

  • PHP 8.1+
  • pieceofcake2/cakephp 2.12+
  • Twig 3.x

Installation

composer require pieceofcake2/twig-view

Then load the plugin and set TwigView.Twig as the view class. See Installation and Quick Start.

Contributing

See the contribution guidelines.

Origin

This package is a maintained fork of predominant/TwigView (not published on Packagist, last upstream version v0.6), originally by Kjell Bublitz and Graham Weldon. It is maintained for CakePHP 2 on modern PHP by pieceofcake2. Changes from the original are listed in CHANGELOG.md.

License

MIT License. See LICENSE.