77use Core \App \Message ;
88use Core \User \Entity \User ;
99use Dot \DependencyInjection \Attribute \Inject ;
10- use Dot \Log \LoggerInterface ;
10+ use Dot \Log \Logger ;
1111use Dot \Mail \Exception \MailException ;
1212use Symfony \Component \Mailer \Exception \TransportExceptionInterface ;
1313
@@ -25,7 +25,7 @@ class MailService
2525 )]
2626 public function __construct (
2727 protected \Dot \Mail \Service \MailService $ mailService ,
28- protected LoggerInterface $ logger ,
28+ protected Logger $ logger ,
2929 private readonly array $ config ,
3030 ) {
3131 }
@@ -46,7 +46,7 @@ public function sendActivationMail(User $user, string $body): bool
4646 try {
4747 return $ this ->mailService ->send ()->isValid ();
4848 } catch (MailException | TransportExceptionInterface $ exception ) {
49- $ this ->logger ->err ($ exception ->getMessage ());
49+ $ this ->logger ->error ($ exception ->getMessage ());
5050 throw new MailException (sprintf (Message::MAIL_NOT_SENT_TO , $ user ->getEmail ()));
5151 }
5252 }
@@ -65,7 +65,7 @@ public function sendResetPasswordRequestedMail(User $user, string $body): bool
6565 try {
6666 return $ this ->mailService ->send ()->isValid ();
6767 } catch (MailException | TransportExceptionInterface $ exception ) {
68- $ this ->logger ->err ($ exception ->getMessage ());
68+ $ this ->logger ->error ($ exception ->getMessage ());
6969 throw new MailException (sprintf (Message::MAIL_NOT_SENT_TO , $ user ->getEmail ()));
7070 }
7171 }
@@ -84,7 +84,7 @@ public function sendResetPasswordCompletedMail(User $user, string $body): bool
8484 try {
8585 return $ this ->mailService ->send ()->isValid ();
8686 } catch (MailException | TransportExceptionInterface $ exception ) {
87- $ this ->logger ->err ($ exception ->getMessage ());
87+ $ this ->logger ->error ($ exception ->getMessage ());
8888 throw new MailException (sprintf (Message::MAIL_NOT_SENT_TO , $ user ->getEmail ()));
8989 }
9090 }
@@ -103,7 +103,7 @@ public function sendRecoverIdentityMail(User $user, string $body): bool
103103 try {
104104 return $ this ->mailService ->send ()->isValid ();
105105 } catch (MailException | TransportExceptionInterface $ exception ) {
106- $ this ->logger ->err ($ exception ->getMessage ());
106+ $ this ->logger ->error ($ exception ->getMessage ());
107107 throw new MailException (sprintf (Message::MAIL_NOT_SENT_TO , $ user ->getEmail ()));
108108 }
109109 }
@@ -120,7 +120,7 @@ public function sendWelcomeMail(User $user, string $body): bool
120120 try {
121121 return $ this ->mailService ->send ()->isValid ();
122122 } catch (MailException | TransportExceptionInterface $ exception ) {
123- $ this ->logger ->err ($ exception ->getMessage ());
123+ $ this ->logger ->error ($ exception ->getMessage ());
124124 throw new MailException (sprintf (Message::MAIL_NOT_SENT_TO , $ user ->getEmail ()));
125125 }
126126 }
0 commit comments