FriendsOfSymfony / FOSUserBundle

Provides user management for your Symfony project. Compatible with Doctrine ORM & ODM, and custom storages.
https://symfony.com/doc/master/bundles/FOSUserBundle/index.html
MIT License
3.24k stars 1.57k forks source link

Provide autowiring for CanonicalizerInterface #2749

Open soullivaneuh opened 6 years ago

soullivaneuh commented 6 years ago

Example:

  [Symfony\Component\DependencyInjection\Exception\RuntimeException]                                                                                                                                                                                                           
  Cannot autowire service "AppBundle\Manager\EmailManager": argument "$canonicalizer" of method "__construct()" references interface "FOS\UserBundle\Util\CanonicalizerInterface" but no such service exists. You should maybe alias this interface to the existing "fos_user  
  .util.canonicalizer.default" service. Did you create a class that implements this interface?                                                                                                                                                                                 
stof commented 6 years ago

The thing is, we allow configuring different normalizers for the username and the email (even though they use the same default implementation). Which one should we autowire, the email or the username one ?