File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 13
13
14
14
namespace Silverback \ApiComponentsBundle \Helper \User ;
15
15
16
- use Doctrine \ORM \EntityManagerInterface ;
17
16
use Psr \Container \ContainerInterface ;
18
17
use Silverback \ApiComponentsBundle \Entity \User \AbstractUser ;
19
18
use Silverback \ApiComponentsBundle \Exception \MailerTransportException ;
@@ -50,7 +49,7 @@ public function sendPasswordResetEmail(AbstractUser $user): bool
50
49
51
50
if ($ email ) {
52
51
$ user ->setPasswordRequestedAt (new \DateTime ());
53
- $ this ->container ->get (EntityManagerInterface::class )->flush ();
52
+ $ this ->container ->get (' doctrine.orm.entity_manager ' )->flush ();
54
53
}
55
54
56
55
return $ this ->send ($ email );
@@ -62,7 +61,7 @@ public function sendChangeEmailConfirmationEmail(AbstractUser $user): bool
62
61
63
62
if ($ email ) {
64
63
$ user ->setNewEmailAddressChangeRequestedAt (new \DateTime ());
65
- $ this ->container ->get (EntityManagerInterface::class )->flush ();
64
+ $ this ->container ->get (' doctrine.orm.entity_manager ' )->flush ();
66
65
}
67
66
68
67
return $ this ->send ($ email );
@@ -74,7 +73,7 @@ public function sendEmailVerifyEmail(AbstractUser $user): bool
74
73
75
74
if ($ email ) {
76
75
$ user ->setEmailAddressVerificationRequestedAt (new \DateTime ());
77
- $ this ->container ->get (EntityManagerInterface::class )->flush ();
76
+ $ this ->container ->get (' doctrine.orm.entity_manager ' )->flush ();
78
77
}
79
78
80
79
return $ this ->send ($ email );
Original file line number Diff line number Diff line change 1192
1192
UsernameChangedEmailFactory::class => new Reference (UsernameChangedEmailFactory::class),
1193
1193
PasswordChangedEmailFactory::class => new Reference (PasswordChangedEmailFactory::class),
1194
1194
VerifyEmailFactory::class => new Reference (VerifyEmailFactory::class),
1195
+ 'doctrine.orm.entity_manager ' => new Reference ('doctrine.orm.entity_manager ' ),
1195
1196
'logger ' => new Reference ('logger ' , ContainerInterface::IGNORE_ON_INVALID_REFERENCE ),
1196
- new Reference (EntityManagerInterface::class),
1197
1197
]),
1198
1198
'' , // injected in dependency injection
1199
1199
]
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ private function createEmMockExpectation(): array
215
215
216
216
return [
217
217
[
218
- EntityManagerInterface::class ,
218
+ ' doctrine.orm.entity_manager ' ,
219
219
$ emMock ,
220
220
],
221
221
];
You can’t perform that action at this time.
0 commit comments