Require PHP >= 7.0
[MAILPOET-2582]
This commit is contained in:
committed by
Jack Kitterhing
parent
4fd6f96f76
commit
26b6f340d1
12
RoboFile.php
12
RoboFile.php
@@ -381,9 +381,9 @@ class RoboFile extends \Robo\Tasks {
|
||||
|
||||
return $this->collectionBuilder()
|
||||
|
||||
// PHP >= 5.6 for lib & tests
|
||||
// PHP >= 7.0 for lib & tests
|
||||
->taskExec($task)
|
||||
->rawArg('--runtime-set testVersion 5.6-7.3')
|
||||
->rawArg('--runtime-set testVersion 7.0-7.4')
|
||||
->arg('--ignore=' . implode(',', [
|
||||
'lib/Config/PopulatorData/Templates',
|
||||
'tests/_data',
|
||||
@@ -396,14 +396,14 @@ class RoboFile extends \Robo\Tasks {
|
||||
'tests',
|
||||
])
|
||||
|
||||
// PHP >= 5.6 in plugin root directory
|
||||
// PHP >= 7.0 in plugin root directory
|
||||
->taskExec($task)
|
||||
->rawArg('--runtime-set testVersion 5.6-7.3')
|
||||
->rawArg('--runtime-set testVersion 7.0-7.4')
|
||||
->rawArg('-l .')
|
||||
|
||||
// PHP >= 7.2 for dev tools, etc.
|
||||
->taskExec($task)
|
||||
->rawArg('--runtime-set testVersion 7.2-7.3')
|
||||
->rawArg('--runtime-set testVersion 7.2-7.4')
|
||||
->arg('--ignore=' . implode(',', [
|
||||
'prefixer/build',
|
||||
'prefixer/vendor',
|
||||
@@ -429,7 +429,7 @@ class RoboFile extends \Robo\Tasks {
|
||||
->taskExec(
|
||||
'./tasks/code_sniffer/vendor/bin/phpcbf ' .
|
||||
'--standard=./tasks/code_sniffer/MailPoet ' .
|
||||
'--runtime-set testVersion 5.6-7.3 ' .
|
||||
'--runtime-set testVersion 7.0-7.4 ' .
|
||||
$filePath . ' -n'
|
||||
)
|
||||
->run();
|
||||
|
@@ -6,7 +6,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.6",
|
||||
"php": ">=7.0",
|
||||
"mtdowling/cron-expression": "^1.1",
|
||||
"soundasleep/html2text": "dev-master",
|
||||
"tburry/pquery": "^1.1.1"
|
||||
@@ -87,7 +87,7 @@
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.6.30"
|
||||
"php": "7.0.33"
|
||||
},
|
||||
"sort-packages": true
|
||||
}
|
||||
|
@@ -25,8 +25,8 @@ if (!is_plugin_active('mailpoet/mailpoet.php')) {
|
||||
}
|
||||
|
||||
// Check for minimum supported PHP version
|
||||
if (version_compare(phpversion(), '5.6.0', '<')) {
|
||||
echo 'MailPoet requires PHP version 5.6 or newer (version 7.2 recommended).';
|
||||
if (version_compare(phpversion(), '7.0.0', '<')) {
|
||||
echo 'MailPoet requires PHP version 7.0 or newer (version 7.2 recommended).';
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@@ -39,7 +39,7 @@ if (version_compare(get_bloginfo('version'), '4.6', '<')) {
|
||||
}
|
||||
|
||||
// Check for minimum supported PHP version
|
||||
if (version_compare(phpversion(), '5.6.0', '<')) {
|
||||
if (version_compare(phpversion(), '7.0.0', '<')) {
|
||||
add_action('admin_notices', 'mailpoet_php_version_notice');
|
||||
// deactivate the plugin
|
||||
add_action('admin_init', 'mailpoet_deactivate_plugin');
|
||||
@@ -62,7 +62,7 @@ function mailpoet_php_version_notice() {
|
||||
$notice = str_replace(
|
||||
'[link]',
|
||||
'<a href="https://kb.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_version" target="_blank">',
|
||||
__('MailPoet requires PHP version 5.6 or newer (version 7.2 recommended). Please read our [link]instructions[/link] on how to upgrade your site.', 'mailpoet')
|
||||
__('MailPoet requires PHP version 7.0 or newer (version 7.2 recommended). Please read our [link]instructions[/link] on how to upgrade your site.', 'mailpoet')
|
||||
);
|
||||
$notice = str_replace('[/link]', '</a>', $notice);
|
||||
printf('<div class="error"><p>%1$s</p></div>', $notice);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"require": {
|
||||
"php": ">=5.6",
|
||||
"php": ">=7.0",
|
||||
"cerdic/css-tidy": "^1.7",
|
||||
"doctrine/common": "2.7.3",
|
||||
"doctrine/dbal": "2.5.13",
|
||||
@@ -32,7 +32,7 @@
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.6"
|
||||
"php": "7.0.33"
|
||||
},
|
||||
"sort-packages": true
|
||||
}
|
||||
|
6
prefixer/composer.lock
generated
6
prefixer/composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "e56b3eb2d1443ec19f4f57dff7063fb2",
|
||||
"content-hash": "2316a5d00e066a847c812d348bd0e99e",
|
||||
"packages": [
|
||||
{
|
||||
"name": "cerdic/css-tidy",
|
||||
@@ -1738,10 +1738,10 @@
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.6"
|
||||
"php": ">=7.0"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "5.6"
|
||||
"php": "7.0.33"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user