The service “fos_user.mailer” has a dependency on a non-existent service “templating”

In Symfony 3.4 and FosUserBundle 2.0, add a service mailer into the fos_user config:

fos_user:
    db_driver: orm # other valid values are 'mongodb' and 'couchdb'
    firewall_name: main
    user_class: AppBundle\Entity\User
    service:                               # this lines
        mailer: fos_user.mailer.twig_swift # this lines
    from_email:
        address: "%mailer_user%"
        sender_name: "%mailer_user%

Leave a Comment

tech