title: Symfony2.8 -> 3.3 Sonata\CoreBundle\Form\Extension\DependencyInjectionExtension::__construct() must be of the type array, object given, called in
body: <p>I have updated symfony 2.8 -&gt; 3.3</p>
  <p>Now Top page looks working.
  However when I load the page where uses form builder I burped into this error.</p>
  <blockquote>
  <p>Type error: Argument 3 passed to
  Sonata\CoreBundle\Form\Extension\DependencyInjectionExtension::__construct()
  must be of the type array, object given, called in
  /Users/whitebear/CodingWorks/httproot/myapp/var/cache/dev/appDevDebugProjectContainer.php
  on line 1325</p>
  </blockquote>
  <p>I think this is related to service container though, I can’t figure out where should I fix.</p>
  <p>What I am doing is like this below</p>
  <pre><code>$em = $this-&gt;getDoctrine()-&gt;getManager();
  $reqDoc = new reqDoc();
  $form = $this-&gt;createFormBuilder($reqDoc)
  </code></pre>
  <p>error messages is  below</p>
  <blockquote>
  <p>DependencyInjectionExtension-&gt;__construct(object(appDevDebugProjectContainer), array('Symfony\Component\Form\Extension\Core\Type\FormType'
  =&gt;object(RewindableGenerator), 'Symfony\Component\Form\Extension\Core\Type\RepeatedType'
  =&gt; object(RewindableGenerator), 'Symfony\Component\Form\Extension\Core\Type\SubmitType'
  =&gt; object(RewindableGenerator), 'Symfony\Component\Form\Extension\Core\Type\ChoiceType'
  =&gt; object(RewindableGenerator)), object(RewindableGenerator), null,array('sonata_type_admin'
  =&gt; 'Sonata\AdminBundle\Form\Type\AdminType', 'sonata_type_model' =&gt; 'Sonata\AdminBundle\Form\Type\ModelType', 'sonata_type_model_list' =&gt;
  'Sonata\AdminBundle\Form\Type\ModelTypeList',
  'sonata_type_model_reference' =&gt;
  'Sonata\AdminBundle\Form\Type\ModelReferenceType',
  'sonata_type_model_hidden' =&gt;
  'Sonata\AdminBundle\Form\Type\ModelHiddenType',
  'sonata_type_model_autocomplete' =&gt;
  'Sonata\AdminBundle\Form\Type\ModelAutocompleteType',
  'sonata_type_native_collection' =&gt;
  'Sonata\AdminBundle\Form\Type\CollectionType',
  'sonata_type_choice_field_mask' =&gt;
  'Sonata\AdminBundle\Form\Type\ChoiceFieldMaskType',
  'sonata_type_filter_number' =&gt;
  'Sonata\AdminBundle\Form\Type\Filter\NumberType',
  'sonata_type_filter_choice' =&gt;
  'Sonata\AdminBundle\Form\Type\Filter\ChoiceType',
  'sonata_type_filter_default' =&gt;
  'Sonata\AdminBundle\Form\Type\Filter\DefaultType',
  'sonata_type_filter_date' =&gt;
  'Sonata\AdminBundle\Form\Type\Filter\DateType',
  'sonata_type_filter_date_range' =&gt;
  'Sonata\AdminBundle\Form\Type\Filter\DateRangeType',
  'sonata_type_filter_datetime' =&gt;
  'Sonata\AdminBundle\Form\Type\Filter\DateTimeType',
  'sonata_type_filter_datetime_range' =&gt;
  'Sonata\AdminBundle\Form\Type\Filter\DateTimeRangeType', 'tab' =&gt;
  'Mopa\Bundle\BootstrapBundle\Form\Type\TabType',
  'sonata_block_service_choice' =&gt;
  'Sonata\BlockBundle\Form\Type\ServiceListType',
  'sonata_type_container_template_choice' =&gt;
  'Sonata\BlockBundle\Form\Type\ContainerTemplateType', 'form' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\FormType',
  'birthday' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\BirthdayType',
  'checkbox' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\CheckboxType',
  'choice' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\ChoiceType',
  'collection' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\CollectionType',
  'country' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\CountryType', 'date'
  =&gt; 'Symfony\Component\Form\Extension\Core\Type\DateType', 'datetime' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\DateTimeType',
  'email' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\EmailType', 'file'
  =&gt; 'Symfony\Component\Form\Extension\Core\Type\FileType', 'hidden' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\HiddenType',
  'integer' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\IntegerType',
  'language' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\LanguageType',
  'locale' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\LocaleType', 'money'
  =&gt; 'Symfony\Component\Form\Extension\Core\Type\MoneyType', 'number' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\NumberType',
  'password' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\PasswordType',
  'percent' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\PercentType',
  'radio' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\RadioType',
  'repeated' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\RepeatedType',
  'search' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\SearchType',
  'textarea' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\TextareaType',
  'text' =&gt; 'Symfony\Component\Form\Extension\Core\Type\TextType',
  'time' =&gt; 'Symfony\Component\Form\Extension\Core\Type\TimeType',
  'timezone' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\TimezoneType', 'url'
  =&gt; 'Symfony\Component\Form\Extension\Core\Type\UrlType', 'button' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\ButtonType',
  'submit' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\SubmitType', 'reset'
  =&gt; 'Symfony\Component\Form\Extension\Core\Type\ResetType', 'currency' =&gt;
  'Symfony\Component\Form\Extension\Core\Type\CurrencyType',
  'entity' =&gt; 'Symfony\Bridge\Doctrine\Form\Type\EntityType',
  'sonata_type_immutable_array' =&gt;
  'Sonata\CoreBundle\Form\Type\ImmutableArrayType',
  'sonata_type_boolean' =&gt;
  'Sonata\CoreBundle\Form\Type\BooleanType',
  'sonata_type_collection' =&gt;
  'Sonata\CoreBundle\Form\Type\CollectionType',
  'sonata_type_translatable_choice' =&gt;
  'Sonata\CoreBundle\Form\Type\TranslatableChoiceType',
  'sonata_type_date_range' =&gt;
  'Sonata\CoreBundle\Form\Type\DateRangeType',
  'sonata_type_datetime_range' =&gt;
  'Sonata\CoreBundle\Form\Type\DateTimeRangeType',
  'sonata_type_date_picker' =&gt;
  'Sonata\CoreBundle\Form\Type\DatePickerType',
  'sonata_type_datetime_picker' =&gt;
  'Sonata\CoreBundle\Form\Type\DateTimePickerType',
  'sonata_type_date_range_picker' =&gt;
  'Sonata\CoreBundle\Form\Type\DateRangePickerType',
  'sonata_type_datetime_range_picker' =&gt;
  'Sonata\CoreBundle\Form\Type\DateTimeRangePickerType',
  'sonata_type_equal' =&gt; 'Sonata\CoreBundle\Form\Type\EqualType',
  'sonata_type_color_selector' =&gt;
  'Sonata\CoreBundle\Form\Type\ColorSelectorType'), array('form'
  =&gt;array('sonata.admin.form.extension.field', 'mopa_bootstrap.form.type_extension.help',
  'mopa_bootstrap.form.type_extension.legend',
  'mopa_bootstrap.form.type_extension.error',
  'mopa_bootstrap.form.type_extension.widget',
  'mopa_bootstrap.form.type_extension.horizontal',
  'mopa_bootstrap.form.type_extension.widget_collection',
  'mopa_bootstrap.form.type_extension.tabbed',
  'form.type_extension.form.http_foundation',
  'form.type_extension.form.validator', 'form.type_extension.csrf',
  'form.type_extension.form.data_collector'), 'choice'
  =&gt;array('sonata.admin.form.extension.choice'), 'button' =&gt; array('mopa_bootstrap.form.type_extension.button'), 'date' =&gt;array('mopa_bootstrap.form.type_extension.date'), 'repeated' =&gt; array('form.type_extension.repeated.validator'), 'submit' =&gt;array('form.type_extension.submit.validator')), array())
  in var/cache/dev/appDevDebugProjectContainer.php (line 1325)</p>
  </blockquote>