When a newsletter gets deleted in the Newsletter Repository the associated SendingQueueEntity gets removed.
This can happen and afterwards the SendingTask gets deleted. In these cases, we catch the error that
the entity can not be removed and continue the process.
[MAILPOET-5829]
This commit also removes Sending::getSendingQueueEntity() as the last
calls to this method were removed when refactoring SendingQueueTest.
[MAILPOET-5682]
It was necessary to update a test to be more lenient when comparing
dates and another one to persist a change in Paris to the database.
[MAILPOET-4368]
This method was added in c0c57f6b67 but
its only usage besides integration test was removed in
18a6a1c439. It doesn't seem like it is
still used in our code base.
[MAILPOET-4368]
By moving the refresh code into the method used for getting sending queue entity for the old model object
we want to make our code better protected from working with inconsistent sending queue data.
[MAILPOET-4750]
In case we save the task and and queue saving fails the sending may be triggered with incorrect data in the queue.
Since the scheduled task is used for controlling sending state lets save it as last so that we are sure all related
data are up to date before saving the task.
[MAILPOET-4750]
The commit f44afbddf2 introduced a bug
when replacing Paris code with Doctrine code in lib/Tasks/State.php.
This bug was causing the system status page to display "Preview" instead
of the subject of the listed emails. The problem was happening because
during the refactor there was a mistake and we were trying to get a
SendingQueueEntity via its ID using the ScheduledTaskEntity ID. This
commit fixes this problem by getting a SendingQueueEntity that matches
the given ScheduledTaskEntity ID.
[MAILPOET-4508]
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]