Files
piratepoet/lib/Newsletter/Links
Rodrigo Primo ae99fe3be2 Use Doctrine references when saving links
This commit changes the code of the method
\MailPoet\Newsletter\Links\Links::save() to use Doctrine references
instead of full entities when getting a newsletter and sending queue
entities to save the related links.

We don't need the full entities here, and getting a full entity for the
sending queue was generating an error in the
testItLogsErrorWhenNewlyRenderedNewsletterBodyIsInvalid() integration
test (see the description of PR
https://github.com/mailpoet/mailpoet/pull/3784 for more details).

To be able to get the reference, it was necessary to add a helper method
called getReference() to \MailPoet\Doctrine\Repository.

[MAILPOET-3816]
2021-11-15 13:03:47 +01:00
..