Commit Graph

14 Commits

Author SHA1 Message Date
Jan Lysý
5dfda9f3e2 Move task type const from entity to worker
[MAILPOET-4366]
2022-08-19 15:11:23 +02:00
Jan Lysý
bf74a506b7 Replace using Sending::getRunningQueues
[MAILPOET-4366]
2022-08-19 15:11:23 +02:00
Rostislav Wolny
8d4799b050 Fix models check conditions in sending queue
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
Rostislav Wolny
5042cdd15e Refactor fetching newsletter options in SendingQueue using doctrine
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
Rodrigo Primo
ae13fcc771 Make sure $metas[] is always set for all subscribers in the foreach loop
See https://github.com/mailpoet/mailpoet/pull/4247#pullrequestreview-1050167548

[MAILPOET-4379]
2022-07-27 08:48:15 +02:00
Rodrigo Primo
932512b720 Replace Paris models with Doctrine entities in MetaInfoTest
In the process it was necessary to change the signature of the method
\MailPoet\Mailer\MetaInfo::getNewsletterMetaInfo() to accept a
SubscriberEntity instead of a Subscriber model and also change
\MailPoet\Cron\Workers\SendingQueue\SendingQueue::processQueue() as it
calls getNewsletterMetaInfo().

Doing this was straightforward, but changing the test class for
SendingQueue was a bit more involved. In particular, the test
SendingQueueTest::testItEnforcesExecutionLimitsAfterQueueProcessing().

This test is a bit brittle and was creating Subscriber models without
saving them to the database with invalid statuses and sources. Switching
getNewsletterMetaInfo() to use entities, while
SendingQueue::processQueue() still uses models, meant that it was
necessary to save the subscribers to the database. Because of this, it
was not possible anymore to use invalid statuses and sources, and
thus, the test changed a bit.

[MAILPOET-4379]
2022-07-27 08:48:15 +02:00
Jan Lysý
1310e5afec Disable marking subscribers as processed on error
[MAILPOET-4200]
2022-04-25 10:58:12 +02:00
Rostislav Wolny
d4a8315933 Use mailerFactory in SendingQueue Mailer task
[MAILPOET-4115]
2022-04-11 16:54:38 +02:00
Rostislav Wolny
9b71a7804c Update Monolog/Monolog from v1 to v2
[MAILPOET-4175]
2022-03-28 13:49:41 +02:00
Jan Lysý
82e05dfe0f Add fixes for better compatibility with PHP8.1
[MAILPOET-4015]
2022-03-14 09:38:20 +01:00
Rostislav Wolny
6a6c04f168 Fetch only subscribed recipients when sending a newsletter
[MAILPOET-4166]
2022-03-07 16:05:48 +01:00
David Remer
db6e963c94 Reset $metas array in processing method 'individual' [MAILPOET-3943] 2022-02-09 15:07:21 +01:00
Jan Lysý
5373c811b2 Add return annotation in BatchIterator
PHPStan reported an error in PHP8.1. When we use
the annotation ReturnTypeWillChange it caused another error
for PHPStan in combination in PHP7.2. The new annotations
are solving those issues.
[MAILPOET-4053]
2022-01-19 13:14:42 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00