This commit replaces old Paris code with Doctrine entities in
SubscriberTest::_after() and it also truncate only the entities that are
actually used inside the test class. Before this change, the class was
unnecessarily truncating entities that were not used. I'm doing this
commit as part of task to remove all usages of the old NewsletterOption
model and that is why I'm not touching the remaining models in other
methods of this class.
[MAILPOET-4150]
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]
This test is being removed as the field source of the table
wp_mailpoet_subscribers does not accept a null value. When changing the
test class MetaInfoTest from Paris to Doctrine, there is no easy way to
set subscriber source to null and since it is not possible to store this
value in the database anyway, it seems to me this test is not necessary.
I'm opting to keep the code in MetaInfo that sets `subscriber_source` to
`unknown` if the subscriber source is null
(9f790efbf0/mailpoet/lib/Mailer/MetaInfo.php (L64))
just in case this is still possible in some old databases (which I don't
think is the case).
[MAILPOET-4379]
Now pnpm keeps only a single version of all of these packages:
webpack@5.73.0
underscore@1.13.4
react@17.0.2
To verify, use "pnpm list webpack", "pnpm list underscore", and "pnpm list react".
[MAILPOET-4485]
This patch replaces deprecated jQuery methods in the spectrum-colorpicker dependency.
It can be removed when a fix is included in a package update.
See: https://github.com/bgrins/spectrum/pull/564
[MAILPOET-4485]
This patch replaces deprecated jQuery methods in parsleyjs. It can be removed this when
a fix is included in the package update.
Note: deferred.pipe() fix is not implemented yet, see https://github.com/guillaumepotier/Parsley.js/pull/1347
[MAILPOET-4485]
The style.css of @woocommerce/components contains invalid CSS strings like "(1fr)[2]"
that are not parseable by SASS. This patch fixes them to "1fr [2]" format.
[MAILPOET-4485]