Monday, May 21, 2012

Installing Sonata Bundle Error

If you get the next error when using Sonata Admin Bundle you should use the Sonata Admin Bundle 2.0 branch.

Fatal error: Declaration of Sonata\AdminBundle\Form\Extension\Field\Type\FormTypeFieldExtension::getDefaultOptions() must be compatible with that of Symfony\Component\Form\FormTypeExtensionInterface::getDefaultOptions() in /var/www/pulpower.spotymedia.com/vendor/bundles/Sonata/AdminBundle/Form/Extension/Field/Type/FormTypeFieldExtension.php on line 186

 Clear the deps file and copy the next code

[SonataAdminBundle]
    git=git://github.com/sonata-project/SonataAdminBundle.git
    target=/bundles/Sonata/AdminBundle
    version=origin/2.0

run the command php bin/vendors install -reinstall

Now everything should work.

https://github.com/sonata-project/SonataAdminBundle/issues/679

No comments:

Post a Comment