symfony/symfony — Issue #3171: [TwigBridge] FormExtension
Author: henrikbjorn
Created: 2012-01-23 09:15:13+00:00
State: open

```
Catchable Fatal Error: Argument 1 passed to Symfony\Bridge\Twig\Extension\FormExtension::__construct() must be an array, object given, called in /Volumes/Kermode/Projects/Play/Foobar/app/cache/dev/appDevDebugProjectContainer.php on line 1844 and defined in /Volumes/Kermode/Projects/Play/Foobar/vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Extension/FormExtension.php line 34
```

``` php
services['twig'] = $instance = new \Twig_Environment($this->get('twig.loader'), array('debug' => true, 'strict_variables' => true, 'exception_controller' => 'Symfony\\Bundle\\TwigBundle\\Controller\\ExceptionController::showAction', 'cache' => '/Volumes/Kermode/Projects/Play/Diveshare/app/cache/dev/twig', 'charset' => 'UTF-8'));

$instance->addExtension(new \Symfony\Bridge\Twig\Extension\TranslationExtension($this->get('translator')));
$instance->addExtension(new \Symfony\Bundle\TwigBundle\Extension\AssetsExtension($this));
$instance->addExtension(new \Symfony\Bundle\TwigBundle\Extension\ActionsExtension($this));
$instance->addExtension(new \Symfony\Bundle\TwigBundle\Extension\CodeExtension($this));
$instance->addExtension(new \Symfony\Bridge\Twig\Extension\RoutingExtension($this->get('router')));
$instance->addExtension(new \Symfony\Bridge\Twig\Extension\YamlExtension());
$instance->addExtension(new \Symfony\Bridge\Twig\Extension\FormExtension($this->get('form.csrf_provider'), array(0 => 'form_div_layout.html.twig', 1 => 'DiveshareBundle:Form:form_div_layout.html.twig')));
$instance->addExtension(new \Twig_Extension_Debug());
$instance->addExtension(new \Symfony\Bundle\SecurityBundle\Twig\Extension\SecurityExtension($this->get('security.context')));
$instance->addExtension($this->get('twig.extension.gravatar'));

return $instance;
}
```