hellonico / twig-dump-extension
This package is abandoned and no longer maintained.
The author suggests using the symfony/twig-bridge package instead.
VarDumper Twig extension
1.2.0
2022-07-12 15:30 UTC
Requires
- symfony/var-dumper: ^4.2 || ^5.0 || ^6.0
- twig/twig: ^2.4 || ^3.0
This package is auto-updated.
Last update: 2024-03-08 11:42:58 UTC
README
⚠️ This package is abandoned, use Twig-bridge instead.
Twig Dump Extension
Standalone Symfony Var Dumper Twig extension.
Installation
composer require hellonico/twig-dump-extension
Usage
$twig = new Twig_Environment($loader, $options); $twig->addExtension(new HelloNico\Twig\DumpExtension());
In Twig templates:
{{ dump(foo) }}
{% dump foo %}
{% dump foo, bar %}
Extra
Set some dumper options with the hellonico/var-dumper-configurator package:
composer req hellonico/var-dumper-configurator --dev
See https://github.com/nlemoine/var-dumper-configurator for configuration.