Commit Graph

63 Commits

Author SHA1 Message Date
Mike Jolley
435f638011 Apply rules on lib dir 2024-03-21 16:57:59 +01:00
Rodrigo Primo
405366160f Deprecate ModelValidator as don't use Paris models anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
27cbe00bd9 Deprecate SubscriberSegment model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
51cf8e0bd2 Deprecate SubscriberCustomField model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
d824fe23e7 Deprecate Subscriber model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
c6524edf25 Deprecate SendingQueue model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
1a0a64cb4e Deprecate Segment model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
9c3b191a57 Deprecate ScheduledTaskSubscriber model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
c5d1715f39 Deprecate ScheduledTask model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
1d69fcb49f Deprecate NewsletterSegment model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
3312d033ef Deprecate Newsletter model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
cb0b4acd33 Deprecate CustomField model as it is not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Rodrigo Primo
1d6a6a7894 Deprecate main Model class as models are not used anymore
[MAILPOET-5763]
2024-02-23 17:07:34 +01:00
Jan Jakes
d6da2af55b Extract newsletter bulk delete logic to a controller
Repositories shouldn't inject other repositories. Also, this solves circular DI dependency.

[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Rodrigo Primo
a1017c4380 Remove last use of the Tasks\Sending class
I was not able to figure out a easy replacement for this use. As far as
I could check, Newsletter::getQueue() is only called inside
Newsletter::withSendingQueue() and the later is not used anywhere. That
is why I opeted to simply remove the call to
SendingTask::getByNewsletterId().

This could break third-party code using Newsletter::getQueue(). At least they
will get a deprecation notice and won't get a fatal error.

[MAILPOET-5684]
2024-01-31 12:21:54 +01:00
Rodrigo Primo
53bf712da9 Deprecate the StatisticsNewsletters model
This method is not used anymore and can be deprecated.

[MAILPOET-5737]
2024-01-17 22:32:37 +05:00
Rodrigo Primo
2ec8a0aa7a Remove two deprecated methods from the Newsletter model
Those methods were deprecated over six months ago and can now be
removed. They are assoacited with the NewsletterOption model which was
removed in the previous commit.

deprecationError() is also removed as PHPStan was complaining that it is
not used anymore.

[MAILPOET-5762]
2023-12-01 14:18:48 -03:00
Rodrigo Primo
93f12691f7 Remove depreacted models NewsletterOption and NewsletterOptionField
[MAILPOET-5762]
2023-12-01 14:18:48 -03:00
Rodrigo Primo
57129bd460 Deprecate \MailPoet\Models\ScheduledTaskSubscriber::setSubscribers()
This model is no longer used since Sending::setSubscribers() was
refactored in a previous commit.

[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
Rodrigo Primo
d17d9ce246 Remove one more deprecated method from the Segment model
This methods was deprecated a long time ago and it is not used anymore.

[MAILPOET-5455]
2023-07-05 12:09:22 +03:00
Rodrigo Primo
bb16e94a5b Remove deprecated methods from the Segment model
Those methods were long deprecated and are not used anymore.

[MAILPOET-5455]
2023-07-05 12:09:22 +03:00
Rodrigo Primo
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
Rodrigo Primo
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
Rodrigo Primo
87f703f22a Update NewsletterOption and NewsletterOptionField removal date
This commit updates the remove date of the deprecated models
NewsletterOption and NewsletterOptionField. When they were initially
deprecated it was missed that two Newsletter model methods still used
them.

Those two methods are deprecated in this commit as apparently they are
not used anymore in MP's codebase.

[MAILPOET-5252]
2023-04-28 17:23:03 +01:00
Rodrigo Primo
6f511c685b Remove deprecated methods from the Newslleter model
Those methods were deprecated over six months ago.

[MAILPOET-5252]
2023-04-28 17:23:03 +01:00
Rodrigo Primo
854e8a7f07 Remove models that were deprecated over six months ago
The removal date of all these models passed a couple of months ago.

[MAILPOET-5252]
2023-04-28 17:23:03 +01:00
David Remer
ca3487abee Introduce Automation notification email type
[PREMIUM-223]
2023-04-27 13:40:10 +02:00
Jan Jakes
69f21814e3 Rename "transactional" email type to "automation_transactional"
[MAILPOET-5258]
2023-04-24 09:54:08 +03:00
David Remer
18baff3888 Add type transactional
[MAILPOET-4999]
2023-04-17 13:59:39 +02:00
Jan Lysý
40f4216ff8 Add method for getting WC coupons
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
Rostislav Wolny
ee83e4d748 Refactor SubscriberActions:subscribe to return status of confirmation email
We need to pass the error or success info about the confirmation email
in order to be able to be able to display the error message.
[MAILPOET-4736]
2022-12-28 14:25:56 +01:00
Jan Jakes
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Jan Lysý
5278ed324d Remove ScheduledTask::touchAllByIds method
[MAILPOET-4309]
2022-08-31 13:42:21 +02:00
Jan Lysý
4687fcd44f Remove refactored method from old model
[MAILPOET-4310]
2022-08-22 11:04:45 +02:00
Rodrigo Primo
8d29c2df49 Deprecate MappingToExternalEntities model and stop creating its table
Since we are removing all the MP2 migration code the table
wp_mailpoet_mapping_to_external_entities is not needed anymore. It was
used to map MP2 objects to MP3 objects. This commit removes the code
that creates this table for new installs and deprecates its model.

[MAILPOET-4376]
2022-08-15 12:46:22 +02:00
David Remer
97e160bf67 Fix WordPress.WP.I18n.MissingArgDomain
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
218de96024 Fix WordPress.WP.I18n.MissingTranslatorsComment errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
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
Rostislav Wolny
09160a58ff Replace deprecated NewsletterOptionField::findArray with doctrine code
This commit is a quick fix for deprecation warnings which we get after we deprecated NewsletterOptions
and NewsletterOptionFields models.
We will soon stop using the old Newsletter model completely.
[MAILPOET-4511]
2022-07-29 10:33:05 +02:00
Rodrigo Primo
f27326b590 Deprecate models NewsletterOption and NewsletterOptionField
Those models are being deprecated as they are not used anymore in our
codebase.

[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
Rodrigo Primo
5985a10c8f Deprecate some unused Models\Newsletter methods
This commit deprecates the following Models\Newsletter methods:

- \MailPoet\Models\Newsletter::filterType()
- \MailPoet\Models\Newsletter::getWelcomeNotificationsForSegments()
- \MailPoet\Models\Newsletter::duplicate()

I'm doing this as part of a ticket to replace the models
NewsletterOption and NewsletterOptionField with Doctrine code. The
methods deprecated here use those models. But since they are not used
anymore in our codebase, I figured it would be easier to deprecate them
instead of replacing the models.

[MAILPOET-4150]
2022-07-27 08:48:44 +02:00
Sam Najian
a2f65bf647 Migrate PersonalDataExporters\NewslettersExporter to Doctrine
[MAILPOET-4348]
2022-07-18 16:47:48 +02:00
Sam Najian
f50ed0cd04 Add missing re_engagement type to newsletter meta info
[MAILPOET-4393]
2022-07-14 12:01:49 +02:00
David Remer
868661a543 Add email type 'automation'
[MAILPOET-4432]
2022-07-04 14:04:16 +03:00
David Remer
64c184de9e Revert "Deprecate models NewsletterOption and NewsletterOptionField"
This reverts commit 5fc426e18a.
2022-05-17 12:27:46 +02:00
David Remer
74e59e5f96 Revert "Deprecate some unused Models\Newsletter methods"
This reverts commit 1c70f2ccff.
2022-05-17 12:27:46 +02:00
Rodrigo Primo
725b7b0bf5 Deprecate models NewsletterOption and NewsletterOptionField
Those models are being deprecated as they are not used anymore in our
codebase.

[MAILPOET-4150]
2022-05-16 13:18:21 +02:00
Rodrigo Primo
73aa081876 Deprecate some unused Models\Newsletter methods
This commit deprecates the following Models\Newsletter methods:

- \MailPoet\Models\Newsletter::filterType()
- \MailPoet\Models\Newsletter::getWelcomeNotificationsForSegments()
- \MailPoet\Models\Newsletter::duplicate()

I'm doing this as part of a ticket to replace the models
NewsletterOption and NewsletterOptionField with Doctrine code. The
methods deprecated here use those models. But since they are not used
anymore in our codebase, I figured it would be easier to deprecate them
instead of replacing the models.

[MAILPOET-4150]
2022-05-16 13:18:21 +02:00
Rodrigo Primo
01f0585400 Remove three Paris models that have been deprecated over six months ago
This commit removes the models Form, NewsletterLink and
StatisticsUnsubscribes as they were deprecated over six months ago and
are not used anymore in our codebase.

[MAILPOET-4325]
2022-05-16 11:33:00 +02:00
Rodrigo Primo
611cf5abb7 Deprecate StatisticsWooCommercePurchases model as it is not used anymore
We can remove this model after six months.

[MAILPOET-4150]
2022-05-13 08:45:28 +02:00