Skip to content
Automatic generation of Twig documentation
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests/Describer
.editorconfig
.gitignore
.php_cs.dist
.travis.yml
CHANGELOG.md
LICENSE
README.md
composer.json
phpunit.xml
psalm.xml

README.md

Twig Documentor

Build Status codecov Packagist Psalm coverage GitHub license

Automatically generates documentation for Twig extensions.

Installation

composer require --dev cvc/twig-documentor

Usage

<?php

$environment = new \Twig\Environment(new \Twig\Loader\ArrayLoader());
$environmentDescriber = new \Cvc\TwigDocumentor\Describer\EnvironmentDescriber(
    new \Cvc\TwigDocumentor\Describer\FunctionDescriber(\phpDocumentor\Reflection\DocBlockFactory::createInstance()),
    new \Cvc\TwigDocumentor\Describer\FilterDescriber(\phpDocumentor\Reflection\DocBlockFactory::createInstance())
);
$documentation = $environmentDescriber->describe($environment);
$documentation = $documentation->withSource(__DIR__.'/*');

Development Team


Markus Poerschke

Developer

You can’t perform that action at this time.