Commit Graph

10 Commits

Author SHA1 Message Date
ee83e4d748 Refactor SubscriberActions:subscribe to return status of confirmation email
We need to pass the error or success info about the confirmation email
in order to be able to be able to display the error message.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
7db40b27b5 Fix errors automatically with phpcbf
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
4832771185 Refactor the captcha system
The current Captcha class has a lot of responsibilities. It renders the captcha
image, can check if a certain captcha type is a Google captcha, if a captcha is
required for a certain email. The SubscriberSubscribeController is not only in
charge of "controlling" the subscription process but also validates, whether a
captcha is correct or not. This architecture made it difficult to extend the
functionality and introduce the audio captcha feature.

Therefore this commit refactors the captcha architecture and tries to seperate
the different concerns into several classes and objects. Validation is now done
by validators.

The CaptchaPhrase now is in charge of keeping the captcha phrase consistent
between the image and the new audio, so that you can renew the captcha and both
captchas are in sync.

[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
88f427290b Add tagging subscribers subscribed via form
[MAILPOET-4557]
2022-09-28 11:42:51 +02:00
bfa9a98df6 Do not display form if logged in and registered to any segment.
[MAILPOET-3059]
2022-02-23 15:22:24 +01:00
84eb5af37f Pass current testcase when adding expectations to stubs 2022-02-09 15:06:58 +01:00
83490540df Test: No subscription made when before_subscribe hook throws error 2022-02-09 15:06:58 +01:00
6ad48a116e Remove dispensable comment 2022-02-09 15:06:58 +01:00
954bd37729 Add unit tests for SubscriberSubscribeController
[MAILPOET-3632]
2022-02-09 15:06:58 +01:00