public function registerBundles()
{
$bundles = array(new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new \Symfony\Bundle\TwigBundle\TwigBundle());
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new \Joli\GifExceptionBundle\GifExceptionBundle();
}
return $bundles;
}