Adi
Adi

Reputation: 397

Symfony2 Error Security.yml

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.

Upvotes: 2

Views: 809

Answers (1)

zoore
zoore

Reputation: 330

replace in your config.yml

to:

security:
    encoders:
        AppBundle\Entity\User: bcrypt

Upvotes: 1

Related Questions