Skip to content

Conversation

sandergo90
Copy link

Move aliases created in the FOSUserExtension to the proper XML service definition files.

<argument>%fos_user.model.user.class%</argument>
</service>

<service id="FOS\UserBundle\Model\UserManagerInterface" alias="fos_user.user_manager" public="false" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would not make it work for people not using Doctrine. We must add it in a file being always loaded

Copy link
Author

@sandergo90 sandergo90 Feb 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof In which file should we add it ? A custom new one ?

$container->setAlias('fos_user.util.email_canonicalizer', $config['service']['email_canonicalizer']);
$container->setAlias('fos_user.util.username_canonicalizer', $config['service']['username_canonicalizer']);
$container->setAlias('fos_user.util.token_generator', $config['service']['token_generator']);
$container->setAlias('FOS\UserBundle\Util\TokenGeneratorInterface', new Alias('fos_user.util.token_generator', false));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also move this one to the util.xml file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Readd missing part

Add tokengenerator to util.xml
@stof stof changed the title [Deprecations]: add aliases for fos user interfaces in XML Move autowiring aliases to XML files Feb 19, 2018
This allows having the autowiring alias defined even when not using Doctrine.
@stof stof merged commit 2e04e33 into FriendsOfSymfony:master Feb 19, 2018
@sandergo90 sandergo90 deleted the deprecations/3.4-xml branch February 19, 2018 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants