1

I am using Guard as new authentification system. I registered a new service like this:

app.form_login_authenticator:
    class: AppBundle\Security\FormLoginAuthenticator
    arguments:
        - @security.password_encoder
        - @router

and throws exception:

../app/config/config.yml" does not contain valid YAML

Anybody could imagine why?

Thanks and Greetings!

Stephan Vierkant
  • 9,674
  • 8
  • 61
  • 97
Creative crypter
  • 1,348
  • 6
  • 30
  • 67
  • 3
    The new yaml processor is a bit stricter. Use quotes around all strings containing an @ symbol. '@router' – Cerad Dec 29 '15 at 12:25
  • 1
    take a look at this https://stackoverflow.com/questions/34069477/symfony-3-di-add-service-to-argument/34070005#34070005 – Matteo Dec 29 '15 at 12:47

1 Answers1

0

Try

app.form_login_authenticator:
    class: AppBundle\Security\FormLoginAuthenticator
    arguments: ["@security.password_encoder","@router"]
Don Omondi
  • 946
  • 9
  • 15
  • Your answer is saying to try something out rather than giving an answer with the explanation as to why the YAML is invalid (as @cerad explained in his comment). Modify your answer accordingly. – Jason Roman Dec 29 '15 at 17:22