Commit Graph

15684 Commits

Author SHA1 Message Date
Oluwaseun Olorunsola
a47032728f Add the “Learn more” link when calculating size times out.
[MAILPOET-3493]
2021-12-16 14:49:00 +01:00
Ján Mikláš
b88605216c Add basic WordPress typography styles to Storybook
[MAILPOET-3618]
2021-12-16 14:48:00 +01:00
Ján Mikláš
6242468ce4 Use React Select's tag property to highlight email sent date
[MAILPOET-3618]
2021-12-16 14:48:00 +01:00
Ján Mikláš
aac2e43a14 Don't truncate options in <ReactSelect> component
[MAILPOET-3618]
2021-12-16 14:48:00 +01:00
Oluwaseun Olorunsola
3e447db664 Deactivate automatic, welcome, notification, and re_engagement emails on edit
[MAILPOET-3960]
2021-12-16 14:47:04 +01:00
Oluwaseun Olorunsola
3212e1933e Deactivate automatic emails on edit
[MAILPOET-3960]
2021-12-16 14:47:04 +01:00
Pavel Dohnal
37a05f22bb Add operator to wp roles segment
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
18771be94d Make the user roles multile select
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
c1f4e0bf32 Make sure the user roles is always array
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
78e1ea5954 Map operator in WP role
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
c5d994dbf0 Make the segment work with ALL condition
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
d541edc865 Make the segment work with NONE condition
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
d43905e77e Use a better assert
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
6d5d5ccfda Make the segment work with ANY condition
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Pavel Dohnal
c2e841fd3d Make role always array
[MAILPOET-3955]
2021-12-16 14:46:16 +01:00
Jan Lysý
8a1094bcd9 Add tests on rendering error container
[MAILPOET-3875]
2021-12-16 14:45:37 +01:00
Jan Lysý
f1d3135de0 Use form id to identification error container
[MAILPOET-3875]
2021-12-16 14:45:37 +01:00
Rodrigo Primo
09c94577a9 Fix PHPStan errors in tests/DataFactories/Form.php
This commit fixes errors in tests/DataFactories/Form.php after changes
to PHPStan configuration files.

[MAILPOET-4024]
2021-12-16 11:36:24 +01:00
Rodrigo Primo
ec18076f71 Combine PHPStan config files into one
Before this commit, we had two different PHPStan configuration files. One
for the lib directory (phpstan.neon) and another one for the tests directory
(phpstan-tests.neon). This commit combines both files into one
(phpstan.neon) to make it easier to maintain and make changes to PHPStan
configurations.

As part of this process, it was necessary to change the Robo command
`./do qa:phpstan` to call PHPStan only once and to
combine php-version-dependent-config-tests.php and
php-version-dependent-config-libs.php in a new file called
php-version-dependent-config.php.

Another benefit of this change is that running PHPStan only once with a
single configuration file means that it runs about 20% faster than
the previous setup.

[MAILPOET-4024]
2021-12-16 11:36:24 +01:00
Jan Lysý
cb13830574 Fix code of changed return type in CSSParser
[MAILPOET-3966]
2021-12-15 17:23:11 +01:00
Jan Lysý
cbc56efc1e Increase minimal PHP version for PHPStan
[MAILPOET-3966]
2021-12-15 17:23:11 +01:00
Jan Lysý
67d6d8cca2 Increase minimal PHP version for Code Sniffer
[MAILPOET-3966]
2021-12-15 17:23:11 +01:00
Jan Lysý
d3b766da17 Use PHP 7.2 in build as the oldest version
[MAILPOET-3966]
2021-12-15 17:23:11 +01:00
Jan Lysý
1d5366d4d2 Update PHP version in composer
[MAILPOET-3966]
2021-12-15 17:23:11 +01:00
Jan Lysý
515a20aa23 Update PHP version warning notice
[MAILPOET-3966]
2021-12-15 17:23:11 +01:00
Jan Lysý
bce147add4 Update required PHP version check
[MAILPOET-3966]
2021-12-15 17:23:11 +01:00
Jan Lysý
808b695147 Increase required PHP in readme to 7.2
[MAILPOET-3966]
2021-12-15 17:23:11 +01:00
Jan Lysý
40e13eb449 Update PHP version check to minimum version 7.2
[MAILPOET-3966]
2021-12-15 17:23:11 +01:00
Brezo Cordero
940e0884cb Update API Test
Change the return of mocked function sendConfirmationEmailOnce after rebasing the changes that refactor that function.

[MAILPOET-3813]
2021-12-15 11:51:12 +01:00
Brezo Cordero
98df610639 Remove condition for extra data on the response builder
[MAILPOET-3820]
2021-12-15 11:51:12 +01:00
Brezo Cordero
81e0772459 Refactor MPAPI subscribeToLists to Doctrine
[MAILPOET-3820]
2021-12-15 11:51:12 +01:00
Rostislav Wolny
2bb04ed5bd Release 3.75.1 2021-12-15 11:35:16 +01:00
Jan Lysý
b70e85fc48 Fix use statement for the pQuery
[MAILPOET-4025]
2021-12-15 10:02:31 +01:00
Rostislav Wolny
f48da634f0 Release 3.75.0 2021-12-14 11:32:39 +01:00
Rodrigo Primo
d39d09dd72 Remove calls to Subscriber::setError() from ConfirmationEmailMailer
This commit is part of a task to replace Paris with Doctrine in the
class ConfirmationEmailMailer. Specifically, it removes two calls to
Subscriber::setError() inside ConfirmationEmailMailer::sendConfirmationEmail().

setError() was used to define an error message that was used only in one
of the instances where sendConfirmationEmail() is called
(API::subscribeToLists()). setError() was replaced with code that throws
an exception when there is an error. Thus it was necessary to change all
the places where ConfirmationEmailMailer::sendConfirmationEmail() is
called to handle the exception.

In some cases, there are some oddities as sendConfirmationEmail() can
return false or throw an exception in case of an error and calling code
must account for both. I decided to settle with this approach as
refactoring the rest of this method to use exceptions instead of
returning false seemed outside of the scope of this task.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Rodrigo Primo
6c05b3eaf0 Pass SubscriberEntity to sendConfirmationEmail() and sendConfirmationEmailOnce()
This commit changes the methods sendConfirmationEmail() and
sendConfirmationEmailOnce() to accept as the first parameter an instance
of SubscriberEntity instead of the old model Subscriber. It also updates
all the places where those two methods are called.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Rodrigo Primo
8cd3205ade Add support for SubscriberEntity in Mailer::send()
This will be used once ConfirmationEmailMailer is refactored to pass a
SubscriberEntity instance to Mailer::send() in a subsequent commit and
is likely to be useful when refactoring other classes that call the same
method.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Rodrigo Primo
1dbedea50f Refactor MetaInfo::getConfirmationMetaInfo() to use Doctrine
This method is used only inside
ConfirmationEmailMailer::sendConfirmationEmail(). So I figured it was
best to refactor it as well to use SubscriberEntity instead of the old
Subscriber model as part of the task to do the same for the
ConfirmationEmailMailer class. I opted for this approach since it was a
straightforward change.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Rodrigo Primo
2e57e87951 Add support for setting source when using Subscriber data factory
This will be used in a subsequent commit when converting a test from
Paris to Doctrine.

[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Rodrigo Primo
98562998b8 Fix typo
[MAILPOET-3815]
2021-12-13 16:03:07 +01:00
Rodrigo Primo
1c195789ba Fix "# number of machine opens" segment
There was a bug that was making the code use the wrong filter
and thus the wrong SQL query for the "# number of machine opens"
segment. Resulting in the wrong subscribers being associated with this
segment.

The email() method of the FilterFactory was using the wrong check to
decide which filter to use for this segment (the filter should be
EmailOpensAbsoluteCountAction and the factory was using EmailAction).
This commit fixes this problem.

[MAILPOET-4011]
2021-12-13 13:54:17 +01:00
Oluwaseun Olorunsola
b5039a012b Recommend MailPoet in free users emails
[MAILPOET-3981]
2021-12-13 13:20:40 +01:00
Jan Jakes
cb5363b143 Remove JS makepot tooling 2021-12-13 12:52:15 +01:00
Jan Jakes
7db9a82c4e Move PHP makepot tools up to tasks/mailpot 2021-12-13 12:52:15 +01:00
Jan Jakes
2afec666b7 Make POT file output closer to previous state 2021-12-13 12:52:15 +01:00
Jan Jakes
a0f3008a40 Use makepot directly from PHP 2021-12-13 12:52:15 +01:00
Pavel Dohnal
c7642b1c11 Remove link to demo
[MAILPOET-4012]
2021-12-13 09:39:46 +01:00
Rostislav Wolny
54a925f064 Remove PHP closing tags from pQuery classes
[MAILPOET-3890]
2021-12-13 09:36:43 +01:00
Rostislav Wolny
115738845d Fix deprecated FILTER_SANITIZE_STRING
I'm not sure why FILTER_SANITIZE_STRING was needed here so to be safe
I decided to replace it with a polyfill function.
See https://stackoverflow.com/questions/69207368/constant-filter-sanitize-string-is-deprecated
[MAILPOET-3890]
2021-12-13 09:36:43 +01:00
Rostislav Wolny
a7a42dc493 Remove unused services used for listing
After we refactored the most of our API endpoint to doctrine.
These services are no longer needed.
[MAILPOET-3890]
2021-12-13 09:36:43 +01:00