Commit Graph

3543 Commits

Author SHA1 Message Date
Pavel Dohnal
c1a51d8be4 Add filter class
[MAILPOET-3224]
2021-04-19 16:57:50 +02:00
Rostislav Wolny
53cb51b5dd Update customer names on checkout using order/user data
This change replaces slow SQL queries used for updating customer names
with modification of those names using loaded data and subscriber model.
[MAILPOET-3565]
2021-04-19 09:37:26 +02:00
Pavel Dohnal
65c9bad64c Fix pre-selecting date value
[MAILPOET-3470]
2021-04-15 15:47:57 +02:00
Jan Lysý
fc455d7cfa Add saving custom fields on subscribe
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
02e1ce7e4d Remove getFields method from FormEntity
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
3d5905c288 Remove usage old model from FormsResponseBuilderTest
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
31bff0efb4 Remove rest of usage old model SubscriberIP
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
5ce4eeed10 Fix flaky test in SubscriberActionsTest
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
5ef040bb93 Add integration test for SubscriberSubscribeController
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
52f988d91e Add integration test for StatisticsFormsRepository
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
4d56020071 Remove usage old model from Throttling
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
a715aa9b76 Replace usages of StatisticsForms with Doctrine
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
66a0834a37 Use CustomFieldRepository in integration APITest
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
52b3e34839 Create controller for subscribe Subscribers
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
d5de54b1d5 Refactor Throttling to service
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
13b4c74c00 Use Doctrine in SubscriberActions integration tests
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Jan Lysý
69d5eb42f7 Use Doctrine in RequiredCustomFieldValidator
[MAILPOET-3032]
2021-04-12 14:26:36 +02:00
Rodrigo Primo
5ceb084c64 Refactor Forms::delete() to use Doctrine
[MAILPOET-3039]
2021-04-12 13:35:14 +02:00
Rodrigo Primo
49f0c054fd Refactor Forms::restore() to use Doctrine
[MAILPOET-3039]
2021-04-12 13:35:14 +02:00
Rodrigo Primo
e054f05222 Refactor Forms::trash() to use Doctrine
[MAILPOET-3039]
2021-04-12 13:35:14 +02:00
Jan Lysý
966d6f36ff Add integration test for SegmentDependencyValidator
[MAILPOET-3477]
2021-04-12 11:11:25 +02:00
Jan Lysý
8090dd1bb3 Add acceptance test for missing plugin message
[MAILPOET-3477]
2021-04-12 11:11:25 +02:00
Rostislav Wolny
49edb9e02a Add test for woo commerce dynamic segments editing
[MAILPOET-3555]
2021-04-12 09:24:05 +02:00
Rodrigo Primo
a7fe876180 Fix PHPStan undefined property error introduced after update to version 0.12.83
This commit fixes the following PHPStan error what started happening
after the update to version 0.12.83. It seems that our model classes
work with properties using both snake_case and camelCase names, so that
is why the change made here doesn't affect the modified unit test.

```
 ------ ---------------------------------------------
  Line   tests/integration/Models/SubscriberTest.php
 ------ ---------------------------------------------
  740    Access to an undefined property
         MailPoet\Models\Subscriber::$deleted_at.
 ------ ---------------------------------------------
```

[MAILPOET-3491]
2021-04-12 08:55:14 +02:00
Rodrigo Primo
030bd8c1c8 Fix PHPStan parameter type error introduced after update to version 0.12.83
This commit fixes the following PHPStan errors introduced after the update to version 0.12.83:

```
 ------ ----------------------------------------------------------------------
  Line   lib/Newsletter/Renderer/Blocks/Footer.php
 ------ ----------------------------------------------------------------------
  18     Parameter #1 $html of method MailPoet\Util\pQuery\pQuery::parseStr()
         expects string, array|string|null given.
 ------ ----------------------------------------------------------------------

 ------ ----------------------------------------------------------------------
  Line   lib/Newsletter/Renderer/Blocks/Header.php
 ------ ----------------------------------------------------------------------
  18     Parameter #1 $html of method MailPoet\Util\pQuery\pQuery::parseStr()
         expects string, array|string|null given.
 ------ ----------------------------------------------------------------------
```

[MAILPOET-3491]
2021-04-12 08:55:14 +02:00
Rodrigo Primo
b3f82cccc5 Refactor Forms::duplicate() to use Doctrine instead of Paris
[MAILPOET-3038]
2021-04-07 09:48:53 +02:00
Rostislav Wolny
3d2c62fc16 Unify list vs segment naming with a rest of codebase
[MAILPOET-3418]
2021-04-07 09:48:31 +02:00
Rostislav Wolny
bbd4cb98f8 Skip empty subscribers batches during sending
[MAILPOET-3418]
2021-04-07 09:48:31 +02:00
Rostislav Wolny
5331d76c79 Add error notice for sending newsletter with deleted list
[MAILPOET-3418]
2021-04-07 09:48:31 +02:00
Rostislav Wolny
b3da3ec1bc Pause running tasks that have deleted or trashed segments
[MAILPOET-3418]
2021-04-07 09:48:31 +02:00
Rostislav Wolny
605005dc08 Use doctrine for cleanup in SendingQueueWorker test
[MAILPOET-3418]
2021-04-07 09:48:31 +02:00
Rostislav Wolny
de210991a4 Refactor creation of sending queue worker in test
[MAILPOET-3418]
2021-04-07 09:48:31 +02:00
Jan Lysý
7ef0f7a600 Create simple router with newsletters redirect
[MAILPOET-3536]
2021-04-05 10:26:53 +02:00
Veljko
a6215e22ba Add clear field to fix the test 2021-03-31 13:20:35 +02:00
Rodrigo Primo
faf714e832 Remove more uses of the old models inside FormsTest
[MAILPOET-3036]
2021-03-31 11:37:07 +02:00
Rodrigo Primo
a18ae06f8a Rewrite Forms::listing() API to use Doctrine
This commit replaces the usage of Paris with Doctrine inside
MailPoet\API\JSON\v1\Forms::listing(). It also introduces a new class
MailPoet\Form\Listing\FormListingRepository that is used by listing() to
prepare the query that is executed by Doctrine and a new
MailPoet\API\JSON\ResponseBuilders\FormsResponseBuilder::buildForListing()
method to prepare the response that is returned by listing(). A few tests were
adjusted and new tests were added for the new class.

[MAILPOET-3036]
2021-03-31 11:37:07 +02:00
Rodrigo Primo
298b8730fe Updates parts of FormsTest to use Doctrine entities
This commit simply updates parts FormsTest to use Doctrine entities
instead of Paris objects.

[MAILPOET-3036]
2021-03-31 11:37:07 +02:00
Pavel Dohnal
5480ceb879 Fix tests
[MAILPOET-3476]
2021-03-31 10:50:18 +02:00
Jan Lysý
c07cb227ab Add comments to eslint exceptions
[MAILPOET-3511]
2021-03-30 14:05:47 +02:00
Jan Lysý
410c25482a Fix code style by updated eslint
[MAILPOET-3511]
2021-03-30 14:05:47 +02:00
Pavel Dohnal
0ebdc21a8b Fix flakey integration test
[MAILPOET-3489]
2021-03-30 12:05:47 +02:00
Jan Lysý
8573d99441 Replace timeListener in tests instead of creating new
[MAILPOET-3031]
2021-03-29 15:22:53 +02:00
Jan Lysý
41324cf62a Add more supported fields to save method
[MAILPOET-3031]
2021-03-29 15:22:53 +02:00
Jan Lysý
bb9d4429ec Add integration test for SubscriberSaveController
[MAILPOET-3031]
2021-03-29 15:22:53 +02:00
Jan Lysý
37a7e8e252 Add test for save custom field for Subscribers
[MAILPOET-3031]
2021-03-29 15:22:53 +02:00
Jan Lysý
933ef5e5c8 Add unit test on formatting value in SubscriberCustomFieldEntityTest
[MAILPOET-3031]
2021-03-29 15:22:53 +02:00
Jan Lysý
da5aefa89a Add calling clear in SubscribersTest
[MAILPOET-3031]
2021-03-29 15:22:53 +02:00
Jan Lysý
dcc70b3865 Use doctrine for save Subscriber
[MAILPOET-3031]
2021-03-29 15:22:53 +02:00
Jan Lysý
fd5a9904c0 Add listener for updating lastSubscribedAt
[MAILPOET-3031]
2021-03-29 15:22:53 +02:00
wxa
42adfa784a Remove old dynamic segments code
[MAILPOET-3484]
2021-03-29 14:31:44 +02:00