alb/twig-shell-bundle

Provides a simple Twig REPL


License
MIT

Documentation

Twig Shell Bundle

Provides a simple Twig REPL

Example

$ ./app/console twig:shell
twig > 512*2
1024
twig > 512*2|number_format()
1024
twig > (512*2)|number_format()
1,024
twig >

Install

$ composer require alb/twig-shell-bundle:*

Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Alb\TwigShellBundle\AlbTwigShellBundle(),
    );
}