Due to a bugfix in PHP8.1(https://bugs.php.net/bug.php?id=80808)
PDO now returns correctly integers where it used to return string.
In this commit ensures that data passed to URL will be passed as strings
in order to maintain backward compatibility.
[MAILPOET-3980]
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]
It was also necessary to update two NewsletterTest tests, as after the
change to Links::save(), having a queue ID set became mandatory (before
it was not and one was not set properly in the mock SendingQueue object).
[MAILPOET-3816]
Doing this as part of the task to deprecated old Paris models
(NewsletterLink) and use Doctrine entities instead
(NewslleterLinkEntity).
[MAILPOET-3816]
- Optimizes ViewInBrowser class
- Optimizes and updates shortcode link category to use the refactored
getViewInBrowserUrl() method
- Updates Shortcodes to use the refactored getViewInBrowserUrl() method
- Adds a new method to create a URL data object as a numeric array instead
of associative, thus reducing the size of the object
- Adds a new method to convert numeric URL data object array into associative
array
- Preserves backward compatibility with previous MP3 Beta versions
by checking if the URL data object is already an associative array
- Extracts common tracking data processing/validation code into the Track
class
- Refactors Clicks, Opens and View in Browser classes to enforce
subscriber id and token check
- Allows admin users to preview newsletters without tracking statistics
- (re)Added Endpoints folder to both API and Router
- fixed syntax in namespaces
- xhr.responseJSON is returned to the fail()
- fixed Router endpoints (view in browser, cron,...)