A couple of days ago, I installed the the FOS User Bundle (which involved creating a bundle called UserBundle with an Entity file called User.php. I went step by step through the install process for this, even keeping my company name as Acme. As far as I can tell this section all went ok, since I was able to use Doctrine to create databases, register, login, logout etc
Next I installed the Sonata User Bundle (which has an option to work with FOSUserBundle). This also meant installing Sonata ORM Bundle and Sonata Admin Bundle as part of the process. Again I followed the install step by step.
Now, when I try to load any page I get the following Exception:
InvalidArgumentException: Bundle "UserBundle" does not exist or it is not enabled.
I have definitely included the
- Code: Select all
new Acme\UserBundle\AcmeUserBundle(),
into the Appkernel
My AcmeUserBundle.php looks like this:
- Code: Select all
namespace Acme\UserBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AcmeUserBundle extends Bundle
{
}
My User.php looks like this:
- Code: Select all
// src/Acme/UserBundle/Entity/User.php
namespace Acme\UserBundle\Entity;
use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="fos_user")
*/
class User extends BaseUser
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
public function __construct()
{
parent::__construct();
// your own logic
}
}
Does anybody have any idea what might be broken?
I have spend hours looking at this, and would be grateful for any ideas, for what do look at next
Thanks in Advance
Barry
