I'm using SonataUserBundle with FOSUserBundle. in AppKernel.php it looks like this:
new FOS\UserBundle\FOSUserBundle(),
new Sonata\UserBundle\SonataUserBundle('FOSUserBundle'),
new Application\Sonata\UserBundle\ApplicationSonataUserBundle(),
Some controllers from SonataUserBundle are already overriden.
Now I want to overridee FOSUserBundle ChangePasswordController. So I made: src/Application/FOS/UserBundle/Controller/ChangePasswordController.php src/Application/FOS/UserBundle/ApplicationFOSUserBundle.php
<?php
namespace Application\FOS\UserBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class ApplicationFOSUserBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function getParent()
{
return 'FOSUserBundle';
}
}
as well as modified AppKernel.php
new FOS\UserBundle\FOSUserBundle(),
new Application\FOS\UserBundle\FOSUserBundle(),
new Sonata\UserBundle\SonataUserBundle('FOSUserBundle'),
new Application\Sonata\UserBundle\ApplicationSonataUserBundle(),
The problem is... it's not working correctly.
Fatal error: Uncaught exception 'LogicException' with message 'Bundle "FOSUserBundle" is directly extended by two bundles "SonataUserBundle" and "ApplicationFOSUserBundle".' in /home/piotr.gawlowski/dev_dash_devel/dev-dash/app/bootstrap.php.cache on line 2364 ( ! ) LogicException: Bundle "FOSUserBundle" is directly extended by two bundles "SonataUserBundle" and "ApplicationFOSUserBundle". in /home/piotr.gawlowski/dev_dash_devel/dev-dash/app/bootstrap.php.cache on line 2364