Symfony FOSUserBundle versions: dev-master 8096fd6
Description of the problem including expected versus actual behavior:
Issue on vendor install
Steps to reproduce:
Provide logs (if relevant):
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
The service "fos_user.email_update_listener" has a dependency on a non-exis
tent service "fos_user.email_update_confirmation".
Describe the feature:
I think issue was introduce with this commit "add email update confirmation feature "
Service fos_user.email_update_confirmation is defined in file Resources/config/email_confirmation.xml
<service id="fos_user.email_update_confirmation" class="FOS\UserBundle\Services\EmailConfirmation\EmailUpdateConfirmation">
<argument type="service" id="router" />
<argument type="service" id="fos_user.util.token_generator" />
<argument type="service" id="fos_user.mailer" />
<argument type="service" id="fos_user.email_encryption" />
<argument type="service" id="event_dispatcher" />
</service>
and called in file Resources/config/doctrine.xml
<service id="fos_user.email_update_listener" class="FOS\UserBundle\Doctrine\EmailUpdateListener" public="false">
<argument type="service" id="fos_user.email_update_confirmation"/>
<argument type="service" id="request_stack" />
<tag name="doctrine.event_listener" event="preUpdate" lazy="true" />
</service>
But if you look in file DependencyInjection/FOSUserExtension.php the file Resources/config/email_confirmation.xml is loaded just when confirmation mode is enabled
/**
* @param array $config
* @param ContainerBuilder $container
* @param XmlFileLoader $loader
* @param array $fromEmail
*/
private function loadRegistration(array $config, ContainerBuilder $container, XmlFileLoader $loader, array $fromEmail)
{
$loader->load('registration.xml');
if ($config['confirmation']['enabled']) {
$loader->load('email_confirmation.xml');
}
Got same issue updating
Same update ... same issue ...
Back to 2.0.2 ...
Got the same issue when updating :(
Same issue here...
Same.
See https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2612#issuecomment-352439550
There are several bugs with this PR that I can see.
Most helpful comment
Should be fixed by https://github.com/FriendsOfSymfony/FOSUserBundle/commit/a19a7539c5e96880bd88a56d069d5487c019556f