2
votes

I am learning 'Symfony2' and I was following this:

http://symfony.com/doc/current/cookbook/security/entity_provider.html#configure-security-to-load-from-your-entity

But, when I make the changes in security.yml as mentioned in the document, I get the following error:

[Symfony\Component\Debug\Exception\ContextErrorException]
Notice: Undefined index: algorithm

This is the code which is giving me the error:

# app/config/security.yml
security:
    encoders:
        AppBundle\Entity\User:
            algorithm: bcrypt

Please help me with this. It should not show an error as it is in Symfony2 Docs.

1
try composer self-update first - Nemutaisama
I did that after installing the bundle. But, still got the same error. - Adi

1 Answers

1
votes

replace in your config.yml

to:

security:
    encoders:
        AppBundle\Entity\User: bcrypt