End support for PHP 5.5 [MAILPOET-1317]
This commit is contained in:
@ -310,7 +310,7 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
->taskExec(
|
->taskExec(
|
||||||
'./vendor/bin/phpcs '.
|
'./vendor/bin/phpcs '.
|
||||||
'--standard=./tasks/code_sniffer/MailPoet '.
|
'--standard=./tasks/code_sniffer/MailPoet '.
|
||||||
'--runtime-set testVersion 5.5-7.2 '.
|
'--runtime-set testVersion 5.6-7.2 '.
|
||||||
'--ignore=./lib/Util/Sudzy/*,./lib/Util/CSS.php,./lib/Util/XLSXWriter.php,./lib/Dependencies/*,'.
|
'--ignore=./lib/Util/Sudzy/*,./lib/Util/CSS.php,./lib/Util/XLSXWriter.php,./lib/Dependencies/*,'.
|
||||||
'./lib/Util/pQuery/*,./lib/Config/PopulatorData/Templates/* '.
|
'./lib/Util/pQuery/*,./lib/Config/PopulatorData/Templates/* '.
|
||||||
'lib/ '.
|
'lib/ '.
|
||||||
@ -319,7 +319,7 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
->taskExec(
|
->taskExec(
|
||||||
'./vendor/bin/phpcs '.
|
'./vendor/bin/phpcs '.
|
||||||
'--standard=./tasks/code_sniffer/MailPoet '.
|
'--standard=./tasks/code_sniffer/MailPoet '.
|
||||||
'--runtime-set testVersion 5.5-7.2 '.
|
'--runtime-set testVersion 5.6-7.2 '.
|
||||||
'--ignore=./tests/unit/_bootstrap.php,./tests/unit/_fixtures.php,./tests/integration/_bootstrap.php,./tests/integration/_fixtures.php '.
|
'--ignore=./tests/unit/_bootstrap.php,./tests/unit/_fixtures.php,./tests/integration/_bootstrap.php,./tests/integration/_fixtures.php '.
|
||||||
'tests/unit tests/integration tests/acceptance tests/DataFactories '.
|
'tests/unit tests/integration tests/acceptance tests/DataFactories '.
|
||||||
$severityFlag
|
$severityFlag
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5",
|
"php": ">=5.6",
|
||||||
"twig/twig": "1.*",
|
"twig/twig": "1.*",
|
||||||
"cerdic/css-tidy": "^1.6",
|
"cerdic/css-tidy": "^1.6",
|
||||||
"tburry/pquery": "^1.1.1",
|
"tburry/pquery": "^1.1.1",
|
||||||
|
@ -292,15 +292,6 @@ class Model extends \Sudzy\ValidModel {
|
|||||||
return static::whereNotNull('deleted_at');
|
return static::whereNotNull('deleted_at');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* PHP 5.3 fix for incorrectly returned model results when using asArray() function.
|
|
||||||
* Jira reference: https://goo.gl/UZaMj5
|
|
||||||
* TODO: remove after phasing out PHP 5.3 support
|
|
||||||
*/
|
|
||||||
function asArray() {
|
|
||||||
return call_user_func_array('parent::as_array', func_get_args());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rethrow PDOExceptions to prevent exposing sensitive data in stack traces
|
* Rethrow PDOExceptions to prevent exposing sensitive data in stack traces
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +25,7 @@ if(!is_plugin_active('mailpoet/mailpoet.php')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for minimum supported PHP version
|
// Check for minimum supported PHP version
|
||||||
if(version_compare(phpversion(), '5.5.0', '<')) {
|
if(version_compare(phpversion(), '5.6.0', '<')) {
|
||||||
echo 'MailPoet requires PHP version 5.6 or newer (version 7 recommended).';
|
echo 'MailPoet requires PHP version 5.6 or newer (version 7 recommended).';
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ if(version_compare(get_bloginfo('version'), '4.6', '<')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for minimum supported PHP version
|
// Check for minimum supported PHP version
|
||||||
if(version_compare(phpversion(), '5.5.0', '<')) {
|
if(version_compare(phpversion(), '5.6.0', '<')) {
|
||||||
add_action('admin_notices', 'mailpoet_php_version_notice');
|
add_action('admin_notices', 'mailpoet_php_version_notice');
|
||||||
// deactivate the plugin
|
// deactivate the plugin
|
||||||
add_action('admin_init', 'mailpoet_deactivate_plugin');
|
add_action('admin_init', 'mailpoet_deactivate_plugin');
|
||||||
|
@ -23,8 +23,8 @@ class PHPVersionWarningsTest extends \MailPoetTest {
|
|||||||
expect($this->phpVersionWarning->isOutdatedPHPVersion('5.5.3'))->true();
|
expect($this->phpVersionWarning->isOutdatedPHPVersion('5.5.3'))->true();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testPHP56IsOutdated() {
|
function testPHP56IsNotOutdated() {
|
||||||
expect($this->phpVersionWarning->isOutdatedPHPVersion('5.5.3'))->true();
|
expect($this->phpVersionWarning->isOutdatedPHPVersion('5.6.3'))->false();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testPHP72IsNotOutdated() {
|
function testPHP72IsNotOutdated() {
|
||||||
|
Reference in New Issue
Block a user