Commit Graph

32 Commits

Author SHA1 Message Date
Rodrigo Primo
d39d09dd72 Remove calls to Subscriber::setError() from ConfirmationEmailMailer
This commit is part of a task to replace Paris with Doctrine in the
class ConfirmationEmailMailer. Specifically, it removes two calls to
Subscriber::setError() inside ConfirmationEmailMailer::sendConfirmationEmail().

setError() was used to define an error message that was used only in one
of the instances where sendConfirmationEmail() is called
(API::subscribeToLists()). setError() was replaced with code that throws
an exception when there is an error. Thus it was necessary to change all
the places where ConfirmationEmailMailer::sendConfirmationEmail() is
called to handle the exception.

In some cases, there are some oddities as sendConfirmationEmail() can
return false or throw an exception in case of an error and calling code
must account for both. I decided to settle with this approach as
refactoring the rest of this method to use exceptions instead of
returning false seemed outside of the scope of this task.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Rodrigo Primo
6c05b3eaf0 Pass SubscriberEntity to sendConfirmationEmail() and sendConfirmationEmailOnce()
This commit changes the methods sendConfirmationEmail() and
sendConfirmationEmailOnce() to accept as the first parameter an instance
of SubscriberEntity instead of the old model Subscriber. It also updates
all the places where those two methods are called.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Rodrigo Primo
98562998b8 Fix typo
[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Jan Lysý
4c67e97206 Fix parameters in integration tests
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Jan Lysý
f106d6f2f2 Fix dependencies in integration tests
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Rostislav Wolny
54727ad9a2 Fix integration tests to work with updated codeception/verify
[MAILPOET-3203]
2020-10-20 13:18:43 +02:00
wxa
42edf8726a Remove debug line [MAILPOET-2876] 2020-09-09 13:09:06 +02:00
Rostislav Wolny
c6bb38cc69 Add method for sending confirmation email with duplicates check
[MAILPOET-2876]
2020-09-09 13:09:06 +02:00
Jan Jakeš
b39dac75d6 Autofix number of newlines between methods
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00
wxa
3584b717dc Fix array offset access on null/boolean and with curly braces [MAILPOET-2577] 2020-01-23 12:46:52 +00:00
Jan Jakeš
54549ff037 Convert variable names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
Amine Ben hammou
43df66d162 Add public keyword to methods
[MAILPOET-2413]
2019-12-26 18:09:45 +03:00
Jan Jakeš
60889c53f4 Add Idiorm to MailPoetVendor namespace
[MAILPOET-2545]
2019-11-27 12:38:20 +00:00
Jan Jakeš
8f029d8308 Remove unneeded non-DI fallbacks
[MAILPOET-2515]
2019-11-14 10:02:28 +00:00
Jan Jakeš
d970dda637 Replace "new SettingsController()" with fetch from DI container
[MAILPOET-2436]
2019-11-06 16:32:32 +00:00
Rostislav Wolny
7dba4d900c Rename Subscription\Url to Subscription\SubscriptionUrlFactory
[MAILPOET-2381]
2019-09-25 10:29:20 +01:00
Rostislav Wolny
653dbe5783 Remove aspect mock from Confirmation mailer test
[MAILPOET-2381]
2019-09-25 10:29:20 +01:00
Amine Ben hammou
eebe6e828f Add meta when sending confirmation emails
[MAILPOET-2333]
2019-09-22 10:58:17 +02:00
Amine Ben hammou
a71e7ff1eb Update integration tests
[MAILPOET-2328]
2019-09-12 15:45:34 +02:00
Ján Mikláš
c547d348e0 Fix tests
[MAILPOET-2187]
2019-08-20 13:09:35 -04:00
wxa
7f40e5b512 Clean up unused imports [MAILPOET-2208] 2019-07-19 08:54:50 -04:00
Pavel Dohnal
62a7d17582 Prevent showing mailer errors to subscribers
[MAILPOET-2120]
2019-06-26 11:21:12 -04:00
Rostislav Wolny
f86c0c9612 Refactor authorized emails validation from Bridge to Controller
[MAILPOET-2022]
2019-06-03 12:54:24 -04:00
Rostislav Wolny
8f79d01334 Fix coding style errors
[MAILPOET-1987]
2019-05-21 09:58:29 -04:00
Rostislav Wolny
ced9c549f6 Prevent sending confirmation emails when address is unauthorized
[MAILPOET-1987]
2019-05-21 09:58:29 -04:00
Pavel Dohnal
5da7110eb6 Use short array syntax
[MAILPOET-2090]
2019-05-20 10:18:45 -04:00
Pavel Dohnal
b9af15e19f Enforce array trailling commas
[MAILPOET-2090]
2019-05-20 10:18:45 -04:00
wxa
f2e0dc7d2f Refactor URL helper to DI and move its test to unit [MAILPOET-2009] 2019-05-03 08:41:05 -04:00
Ján Mikláš
fba2914392 Add space between for and ‘(‘
[MAILPOET-1791]
2019-02-13 08:26:27 -05:00
Rostislav Wolny
90d369a721 Fix fatal error with confirmation email sending thru MP API
[MAILPOET-1801]
2019-02-11 11:14:35 -05:00
Ján Mikláš
f96e65dc15 Add integration test for limiting confirmation emails 2019-01-30 13:59:49 +01:00
wxa
87e515b89d Move current unit tests to integration tests 2018-10-29 17:57:47 +03:00