I'm currently having some frustration trying to implement the Symfony2 cookbook for creating a custom user provider utilising doctrine: http://symfony.com/doc/2.0/cookbook/security/entity_provider.html
Here is my security.yml file:
security:
encoders:
Rep\Bundle\ProjectBundle\Model\User:
algorithm: sha1
encode_as_base64: false
iterations: 1
role_hierarchy:
ROLE_USER: ROLE_USER
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ]
providers:
user_db:
entity: { class: ProjectBundle:User, property: username }
firewalls:
admin_area:
pattern: ^/admin
http_basic: ~
access_control:
- { path: ^/admin, roles: ROLE_ADMIN }
Here is my error:

Obvious questions:
- Do I have doctrine installed? Yes. And Registered in the kernel.
- Have I created the user interface and provider. Yes.
Also, I am choosing to build this instead of using the FOSUserBundle as it's too "bulky" for what I need, so any help would be ideal!