Commit Graph

24 Commits

Author SHA1 Message Date
c75bc388c9 Remove unnecessary cleanup code
MAILPOET-5145
2023-04-07 12:11:12 -05:00
8c0854ab47 Consider image src when calculating campaignIds
MAILPOET-5034
2023-02-26 15:20:48 +01:00
49c85c05ed Move campaignId generation to more logical place
MAILPOET-5034
2023-02-26 15:20:48 +01:00
3b9cbbfc61 Remove Coupon block feature flag
MAILPOET-4978
2023-02-23 16:59:15 +01:00
3b5a96a3f7 Add test case that coupon is rendered correctly
[MAILPOET-4984]
2023-02-01 11:21:49 +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
c4966a9cc1 Prevent flakiness when comparing time in NewsletterTest
When comparing the sentAt and processedAt dates there might be one second difference.
This may happen also in the application, because they are updated by separate queries.

This commit fixes the flakiness by comparing timestamps with delta 1 second instead of comparing date time strings.
[MAILPOET-4710]
2022-11-04 12:14:36 -03:00
54ea394f82 Deprecate filter as part of a Doctrine refactor
This commit deprecates the filter
mailpoet_sending_newsletter_render_after and replaces it with
mailpoet_sending_newsletter_render_after_pre_process. This was necessary
because as part of a Doctrine refactor one of the parameters passed to
the old filter changed from a Newsletter model to a Newsletter entity.

[MAILPOET-4680]
2022-10-04 14:41:00 +02:00
d39440f1dc Refactor Newsletter::preProcessNewsletter() to use Doctrine
This commit also removes almost all the usages of the old Newsletter
model from NewsletterTest.

[MAILPOET-4680]
2022-10-04 14:41:00 +02:00
f578f3f16a Remove method Tasks\Newsletter\getNewsletterSegments()
This method was used only once inside SendingQueue and it can be
replaced by NewsletterEntity::getSegmentIds() to simplify the code.

[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
686ee18d16 Replace calls to assert() with Assert::assertInstanceOf()
Doing this as it was mentioned in the review process of the PR.

For more context see: https://wp.me/pcNwfB-wR

[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
ccbdbd3e93 Refactor getNewsletterFromQueue() to use Doctrine instead of Paris
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
4ca656a217 Rename $queue to $sendingTask
Doing this for consistency and to make it more clear that $sendingTask
contains an instance of \MailPoet\Tasks\Sending and not an instance of
\MailPoet\Models\SendingQueue.

[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
a7d0ad6568 Set the type of all the Newsletter parameters that use the Sending class
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
3b9a60c039 Rename NewsletterTest::queue to NewsletterTest::sendingTask
Doing this for consistency and to better makr that this property
contains an instance of \MailPoet\Tasks\Sending and not an instance
of \MailPoet\Models\SendingQueue.

[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
9a92068d5b Refactor Newsletter to use Doctrine instead of the Newsletter model
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
fd0acbd6cf Refactor Newsletter to use Doctrine instead of the NewsletterSegment model
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
a4bb49852d Replace Subscriber model with Doctrine in NewsletterTest
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
2137503e09 Replace NewsletterSegment model with Doctrine in NewsletterTest
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
9bf025874c Replace SendingQueue model with Doctrine in NewsletterTest
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
cc43b25b7d Replace most of the uses of Newsletter model with Doctrine in NewsletterTest
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
ac52f2af99 Introduce phpstan-type for MailerLog data
[MAILPOET-4122]
2022-03-21 10:17:37 +01:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00