Addon for using Twig templates in the Miniframe PHP Framework.

v1.0.0 2021-02-05 19:31 UTC

This package is auto-updated.

Last update: 2022-11-25 19:52:42 UTC


This library adds Twig support to the Miniframe PHP Framework.

build code coverage

How to use

  1. In your existing project, type: composer require miniframe/twig-bundle
  2. Add the directive below to your config.ini
  3. Put templates in $projectroot/templates

Example config.ini directives

base_href        = /
middleware[twig] = Miniframe\Middleware\Twig

cache_path      = cache/twig/
template_path[] = templates/

For Windows Developers

In the bin folder, a few batch files exist, to make development easier.

If you install Docker Desktop for Windows, you can use bin\composer.bat, bin\phpcs.bat, bin\phpunit.bat, bin\phpstan.bat and bin\security-checker.bat as shortcuts for Composer, CodeSniffer, PHPUnit, PHPStan and the Security Checker, without the need of installing PHP and other dependencies on your machine.

The same Docker container and tools are used in Bitbucket Pipelines to automatically test this project.