Commit Graph

40 Commits

Author SHA1 Message Date
586ef334b0 Rewrite SendingQueue\Tasks\Newsletter::prepareNewsletterForSending() using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
ec792b30df Rewrite SendingQueue\Tasks\Newsletter::preProcessNewsletter() using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
c31cbb73c0 Rewrite SendingQueue\Tasks\Links::process() using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
16b2817ce6 Rewrite SendingQueue\Tasks\Newsletter::getNewsletterFromQueue() using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
c76c8f2abb Save the correct datetime value for newsletter sentAt column
We don't need to use the value from `processedAt` here since we can rightfully use the current datetime value

Also, I found out `processedAt` is usually null here for standard newsletters which cause new Carbon to use the server datetime settings

MAILPOET-5795
2023-12-25 21:38:02 +01:00
b05bc86223 Remove usages of MailPoet\Tasks\Sending from renderer
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
2736348feb Remove remaining use of SendingQueue model in Newsletter class
As far as I could test, calling validate() directly is not necessary.
The call to $sendingTask->save() right above calls validate() internaly
and then any errors will be returned by $sendingTask->getErrors().

I added a integration test that seems to confirm this interpretation.

[MAILPOET-4693]
2023-10-30 10:11:11 +01:00
998a1ef1f0 Add method for sending recovery from an invalid state
[MAILPOET-4891]
2023-09-14 21:03:08 +02:00
bb7a98ad82 Save filter segment data to queue at send time
MAILPOET-5509
2023-08-31 14:16:10 +02:00
7c4a84aaf4 Remove notices for hooks that were deprecated over six months ago
[MAILPOET-5272]
2023-04-28 06:05:29 +01:00
9ca259d1d0 Exclude corrupt emails when fetching queue newsletters
[MAILPOET-4983]
2023-03-01 17:46:22 +01: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
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
9204f37560 Remove redundant injection
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
50b613365f Make sure one-click unsubscribe url won't redirect internally
[MAILPOET-4703]
2022-11-11 09:21:30 +01: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
095cddc67e Change Posts::getAlcPostsCount() to use Doctine instead of Paris
[MAILPOET-4680]
2022-10-04 14:41:00 +02:00
58d32a68fb Use processedAt from the correct model
[MAILPOET-4685]
2022-09-29 15:19:09 -03: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
d79cecbef2 Replace some of the uses of SendingQueue model with Doctrine
[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
168ce20a40 Use NewsletterEntity instead of Newsletter model in Links
[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
f6afe987c8 Add return type declaration for Newsletter::prepareNewsletterForSending()
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
68c3277195 Replace Subscriber model with Doctrine in Tasks\Newsletter
[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
05664a0c6a Refactor markNewsletterAsSent() to use Doctrine instead of Paris
[MAILPOET-4363]
2022-09-21 16:03:21 +02:00
538647946e Refactor GATracking to use Doctrine instead of Paris
The test class was also refactored.

[MAILPOET-4592]
2022-09-14 10:38:01 +02:00
b05e6d414c Remove WP\Functions::__ and other translate functions
Under the new sniffer rules, those functions produce errors and, when those methods
are used, the sniffer can not properly be applied.

[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
261f2eaa25 Replace Paris models with Doctrine entities in Shortcodes
[MAILPOET-4364]
2022-08-04 10:55:03 +02:00
fb49ce5ac4 Adjust usage of Renderer::render in SendingQueue\Tasks::Newsletter
[MAILPOET-4360]
2022-07-14 13:13:47 +02:00
789385b0c4 Refactor mailerInstance property to mailerMethod
Naming mailerInstance was confusing since
it is not instance of Mailer class but instance of MailerMethod.
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
d4a8315933 Use mailerFactory in SendingQueue Mailer task
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
9b71a7804c Update Monolog/Monolog from v1 to v2
[MAILPOET-4175]
2022-03-28 13:49:41 +02:00
82e05dfe0f Add fixes for better compatibility with PHP8.1
[MAILPOET-4015]
2022-03-14 09:38:20 +01:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00