Commit Graph

14 Commits

Author SHA1 Message Date
Oluwaseun Olorunsola
10ea5ec55b Remove extra sending method check for new users.
mta.method is probably not set yet.

MAILPOET-4929
2023-02-06 12:11:12 +01:00
Oluwaseun Olorunsola
74549665d6 Stop checking for DisabledMailFunction when the plugin is repeatedly activated and updated.
We will only perform the check when the plugin is first activated and sending method is changed.

MAILPOET-4929
2023-02-06 12:11:12 +01:00
Oluwaseun Olorunsola
53dda33c02 Update method and constant name
MAILPOET-4760
2022-12-05 10:25:28 +01:00
Oluwaseun Olorunsola
0bd627d3b1 Add support for checking misconfiguration of the PHP mail function
Some hosts do perform intentional misconfiguration of the mail function, causing it not to work.

When the mail function is misconfigured, we can still access and execute the mail function from within the codebase, but we get an error.

There’s no accurate way to know the PHP mail function is misconfigured. Unless we execute the function with all the proper parameters and check the exception error message against this error `Could not instantiate mail function.`

MAILPOET-4760
2022-12-05 10:25:28 +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 Jakes
9730fb9272 Move the old dbDelta-based migrator to a migration
This will ensure it runs once and from there, it will continue using the new migrations.

[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
f65821256c Run migrations on activation
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Rostislav Wolny
b96b549f43 Unschedule cron actions before running migrations
We don't want to run any actions during migrations.
This will also clean duplicate trigger actions
that were potentially created because of requests race conditions.
[MAILPOET-4684]
2022-10-13 14:21:43 +02:00
Rostislav Wolny
f745975c03 Prevent triggering migrations when tables are being removed
This was causing flakiness of acceptance test ReinstallFromScratchCest.php:reinstallFromScratch
and also potential issue for production.
In Activator::deactivate we remove MailPoet's DB tables. This takes some time.
In case there is another request during the deletion it may detect some tables are missing and trigger activation
and we end up creating MailPoet tables and removing them at the same time.

This commit adds locking to deactivate method so that any other attempt for activation ends up with an error.

[MAILPOET-4274]
2022-08-03 10:36:57 +02:00
Rostislav Wolny
fc5b25dd20 Force installing language packs updates on plugin activation
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
Rostislav Wolny
84b7ec709a Fetch .com language packs info during plugin activation
[MAILPOET-4144]
2022-03-17 14:51:09 +01:00
John Oleksowicz
82a6fb8ac7 Refactor migrator to be a DI service
[MAILPOET-4061]
2022-02-07 14:37:08 +01:00
Jan Lysý
3f07e591c8 Fix integration tests compatibility with PHP 8.1
[MAILPOET-4053]
2022-01-19 13:14:42 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00