Skip to content

Instantly share code, notes, and snippets.

@sybeck2k
Created October 23, 2012 15:31
Show Gist options
  • Save sybeck2k/3939481 to your computer and use it in GitHub Desktop.
Save sybeck2k/3939481 to your computer and use it in GitHub Desktop.
Add Twig Debug extension in Silex
<?php
//and in your application add:
$app['twig'] = $app->share($app->extend('twig', function($twig, $app) {
$twig->addExtension(new \Twig_Extensions_Extension_Debug());
return $twig;
}));
{
//..
"autoload": {
"psr-0": { "Twig_Extensions_": "vendor/twig/extensions/lib/" }
},
//..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment