Commit Graph

15061 Commits

Author SHA1 Message Date
afb03bd83f Add twig:generate-cache command
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
e18b562212 Load dependencies late
When we create the templates, we are not in the WordPress environment and do not
have a connection to the database. Therefore, we need to instantiate our dependencies
later, so they get only invoked once they are needed, which is, when we are
in the WordPress environment again.

[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
4b7ecfba94 Use newly introduced twig classes
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
052d5e4531 Change path to cached templates
[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
382ae901cc Introduce TwigFileSystemCache
The original FileSystemCache of twig generates the key depending on PHP_VERSION.
We need to produce the same key regardless of PHP_VERSION. Therefore
TwigFileSystemCache overwrites this method.

[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
89b871775a Introduce TwigEnvironment
This commit introduces our own TwigEnvironment class which extends the original Twig\Environment.
The original class produced a different templateClass depending on the PHP version and
the selected options. As we can not rely on PHP version, this would have produced different
template hash keys in the end and Twig would have attempted to store new templates
on the disk, which we want to prevent.

[MAILPOET-3985]
2022-06-08 15:25:41 +02:00
455e463916 Better naming
MAILPOET-4264
2022-06-08 13:14:11 +02:00
6687a291f0 Use random string util for IDs
MAILPOET-4264
2022-06-08 13:14:11 +02:00
12b677ce5e Change default workflow status to draft
MAILPOET-4264
2022-06-08 13:14:11 +02:00
2bf59eab9a Create templated workflows in draft status
MAILPOET-4264
2022-06-08 13:14:11 +02:00
25b9f3a876 Create a workflow from a PHP template
MAILPOET-4264
2022-06-08 13:14:11 +02:00
ea9ba9272f Release 3.89.4 2022-06-07 12:49:56 +02:00
609d80ca05 Fix issue of getting none-customer subs for # order filter
[MAILPOET-4390]
2022-06-06 12:06:07 +02:00
3d1365595b Remove catch block and change quotes
Remove catch block to log unexpected exceptions and change quotes for consistency on error message.

[MAILPOET-4259]
2022-06-06 11:59:27 +02:00
53b9f79e65 Catch the correct Exception when creating a list on import
This is not part of this issue but found it when looking at the Exception types.

[MAILPOET-4259]
2022-06-06 11:59:27 +02:00
2e5e8e808f Verify that new email is unique when editing a subscriber
Throws an exception with information message if email already exists.

[MAILPOET-4259]
2022-06-06 11:59:27 +02:00
978afcdc1c Fix condition for authentication
[MAILPOET-4398]
2022-06-06 11:16:07 +02:00
d3f2eb650a Check existance of custom field block before removing
[MAILPOET-4341]
2022-06-06 11:11:15 +02:00
185b57d9b6 Fix issue with checking response error
[MAILPOET-4341]
2022-06-06 11:11:15 +02:00
246268e00d Fix logic operator when detecting newsletter-editor page
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
b79fe582ad Hide custom fonts optgroup when no custom fonts available
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
da49da80bd Do not show Custom Fonts in the editor, when they are not enabled
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
047040b0ed Prevent Google fonts from loading when they are disabled
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
c73982b414 Respect 3rd party library setting when displaying custom fonts
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
fe44d4c233 Respect mailpoet_display_custom_fonts filter in Iframe
[MAILPOET-4247]
2022-06-06 10:54:12 +02:00
116354c3b0 Add nicer error when downloading zip for deleted branch
[MAILPOET-4399]
2022-06-06 09:35:00 +02:00
75a6c66cb8 Update Circle CI Api from v1.1 to v2
The v1.1 API is deprecated and will be discontinued by the end of the year.
Instead of a single request on v1.1 we now need to fetch pipeline, then workflow and then jobs.
[MAILPOET-4399]
2022-06-06 09:35:00 +02:00
c214eb4c85 Use trunk instead of master as the branch where tests cannot be skipped
[MAILPOET-3466]
2022-05-31 11:23:33 +01:00
e56e2db9ef Update release script to use trunk instead of master
[MAILPOET-3466]
2022-05-31 11:23:33 +01:00
df62347116 Replace occurrences of master with trunk in CodeQL config
[MAILPOET-3466]
2022-05-31 11:23:33 +01:00
cbf3aa477d Replace occurrences of master with trunk in CircleCI config
[MAILPOET-3466]
2022-05-31 11:23:33 +01:00
e3b87202c8 Replace occurrences of master with trunk in CONTRIBUTING.md
[MAILPOET-3466]
2022-05-31 11:23:33 +01:00
c992bdc2c0 Change createAbandonedCartEmail to use mocked currentTime
[MAILPOET-4286]
2022-05-29 08:58:24 +01:00
681effc526 Temporarily removing test that sends emails to AWS
We need to prevent sending from CI so that we are not blocked on AWS. We will revert
this commit when we find a proper fix.
[MAILPOET-4394]
2022-05-26 18:43:35 +02:00
7c6f0b7777 Specify type of $fieldName to string on addField
[MAILPOET-3720]
2022-05-25 09:43:47 +02:00
94fe87008a Remove PHPStan level 6 errors from Import
Remove the following errors from Subscribers\ImportExport\Import\MailChimp:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-25 09:43:47 +02:00
34ce6cd329 Remove PHPStan level 6 errors from Import
Remove the following errors from Subscribers\ImportExport\Import\Import:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

I have also added a few checks when using count and typed the arrays when possible.

[MAILPOET-3720]
2022-05-25 09:43:47 +02:00
466b7a9945 Release 3.89.3 2022-05-24 12:42:59 +02:00
75eb7f6900 Move some types from comments to signature
[MAILPOET-3720]
2022-05-23 12:04:36 +02:00
3f8ee47659 Remove PHPStan level 6 errors from SegmentsRepository.php
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).
I have modified bulkDelete to be similar to bulkDelete on SubscribersRepository.php. This function is used in MailPoet\Test\API\JSON\v1\Segments.

[MAILPOET-3720]
2022-05-23 12:04:36 +02:00
ec47cf429a Remove PHPStan level 6 errors from DynamicSegments
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-23 12:04:36 +02:00
1885825e24 Remove PHPStan level 6 errors from DynamicSegments Filters
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-23 12:04:36 +02:00
b7a37e69b7 Init $customerRoleAdded on WooCommerceTest.php
This will make it non-nullable and have only the type bool.

[MAILPOET-3720]
2022-05-23 12:04:12 +02:00
4cd3c4ed77 Remove PHPStan level 6 errors from Segments
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-23 12:04:12 +02:00
6d5eed6190 Remove PHPStan level 6 errors from Segments\WooCommerce
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-23 12:04:12 +02:00
f6dfb19362 Remove PHPStan level 6 errors from Segments\WP
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).
array_walk on import.php was expecting the key as the second parameter to the function. I have switched it to array_map.

[MAILPOET-3720]
2022-05-23 12:04:12 +02:00
d363c933ea Add strict types declaration
[MAILPOET-4142]
2022-05-23 11:38:32 +02:00
98dde764a6 Add warning about deprecated filter
[MAILPOET-4142]
2022-05-23 11:38:32 +02:00
00fe1eb1c4 Replace transport hook with a new smpt_options
[MAILPOET-4142]
2022-05-23 11:38:32 +02:00
c4c87d75e3 Add definition for WPINC constant
[MAILPOET-4142]
2022-05-23 11:38:32 +02:00