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

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.