Commit Graph

25 Commits

Author SHA1 Message Date
798bc320ed Make sure the doctrine parameters are unique
Previously there was a mismatch between parameters coming from the
dynamic segment and the parameters coming from the export
controller.

[MAILPOET-5382]
2023-06-16 17:00:33 +02:00
00d021109c Move ModelValidator::validateNonRoleEmail() to a new Validator class
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor.

This commit moves the method ModelValidator::validateNonRoleEmail() to a
new Validator class as the method is not used by the validator system of
the Paris models. ModelValidator::validateEmail() was also moved as it
is called by ModelValidator::validateNonRoleEmail().

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
d760272678 Remove ModelValidator::validateIPAddress()
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor. As a first step, this commit removes the method
ModelValidator::validateIPAddress(). It was unused in a single place and
it was replaced with a direct call to the builtin PHP way to validate an
IP address.

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
f9d6e65ece Ensure personal data exporter includes all custom fields
The test testExportSubscriberWithCustomField was only passing before
because we were truncating tables in between tests, so the custom field
id ended up matching the subscriber custom field id coincidentally.

MAILPOET-5145
MAILPOET-5185
2023-04-07 12:11:12 -05:00
1a7b7d1936 Escape segment name for usage in html select
[MAILPOET-4942]
2023-01-16 13:59:30 +01:00
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
0bbf1b96d5 Add notifications about imported subscribers
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
daa5575d87 Reduce maximum records count in batch to exact size
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
5c57dd2006 Add saving tags for imported subscribers
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
a523bb493f Add a token field with tags to the import form
[MAILPOET-4558]
2022-09-15 11:26:10 +02:00
086852ee4d Remove version number from the source
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
24cca1ba04 Cache total subscribers count, add tests
[MAILPOET-4416]
2022-08-24 12:18:44 +02:00
b05e6d414c Remove WP\Functions::__ and other translate functions
Under the new sniffer rules, those functions produce errors and, when those methods
are used, the sniffer can not properly be applied.

[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
5b0e7128c6 Remove usages of StatisticsNewsletters in newsletter exporter
[MAILPOET-4348]
2022-08-01 14:18:59 +02:00
31aa18868b Remove traces of older models in PersonalDataExports namespace
[MAILPOET-4348]
2022-08-01 14:18:59 +02:00
10d4eb5d7f Remove old models from SegmentsExporter
[MAILPOET-4348]
2022-08-01 14:18:59 +02:00
a2f65bf647 Migrate PersonalDataExporters\NewslettersExporter to Doctrine
[MAILPOET-4348]
2022-07-18 16:47:48 +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
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
5c9926b140 Refactor ImportExportFactory to use Doctrine instead of Paris
[MAILPOET-4139]
2022-05-23 11:37:26 +02:00
ac0a9e7b6f Update doctrine/* libraries
[MAILPOET-4175]
2022-03-28 13:49:41 +02:00
9f822818c3 Make sure batch size is positive integer
Fixes PHPStan error array_chunk expects int<1, max>.

[MAILPOET-4131]
2022-03-07 16:07:16 +01:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00