diff --git a/.php_cs b/.php_cs index 1f8821d4c3a..35d4ac32bf4 100644 --- a/.php_cs +++ b/.php_cs @@ -18,5 +18,6 @@ return PhpCsFixer\Config::create() 'array_syntax' => [ 'syntax' => 'short' ], + 'no_unused_imports' => false, ]) ->setFinder($finder); \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index b52cc3b63a3..6a511b3fb14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 cache: directories: diff --git a/app/bundles/LeadBundle/Entity/LeadListRepository.php b/app/bundles/LeadBundle/Entity/LeadListRepository.php index 5ddfe73261c..c1713d39cbc 100644 --- a/app/bundles/LeadBundle/Entity/LeadListRepository.php +++ b/app/bundles/LeadBundle/Entity/LeadListRepository.php @@ -677,7 +677,9 @@ protected function generateSegmentExpression(array $filters, array &$parameters, $v = $v['value']; break; } else { - continue; + // This was previously a "continue" which would act the same as a break in PHP <7.3 + // causing the parameter to be set anyway. A continue 2 is more likely the intention. + continue 2; } // no break case is_bool($v): @@ -1726,7 +1728,7 @@ public function getListFilterExpr($filters, &$parameters, QueryBuilder $q, $isNo default: if (!$column) { // Column no longer exists so continue - continue; + break; } if ('company' === $object) { diff --git a/app/middlewares/VersionCheckMiddleware.php b/app/middlewares/VersionCheckMiddleware.php index 7c2727a3816..1f3e5ef56af 100644 --- a/app/middlewares/VersionCheckMiddleware.php +++ b/app/middlewares/VersionCheckMiddleware.php @@ -20,7 +20,7 @@ class VersionCheckMiddleware implements HttpKernelInterface, PrioritizedMiddlewa const PRIORITY = 10; const MAUTIC_MINIMUM_PHP = '5.6.19'; - const MAUTIC_MAXIMUM_PHP = '7.2.999'; + const MAUTIC_MAXIMUM_PHP = '7.3.999'; /** * @var HttpKernelInterface diff --git a/composer.json b/composer.json index b514988ed70..a5e0e912d72 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ ] }, "require": { - "php": ">=5.6.19 <7.3", + "php": ">=5.6.19 <7.4", "symfony/console": "~2.8", "symfony/debug": "~2.8", @@ -114,6 +114,7 @@ "ramsey/uuid": "^3.7", "sendgrid/sendgrid": "~6.0", "noxlogic/ratelimit-bundle": "^1.11", + "cweagans/composer-patches": "^1.6", "sensio/framework-extra-bundle": "~3.0" }, "require-dev": { @@ -164,6 +165,11 @@ }, "extra": { "symfony-app-dir": "app", - "symfony-web-dir": "../" + "symfony-web-dir": "../", + "patches": { + "doctrine/orm": { + "#6991 Support PHP 7.3 without dropping support for 5.6/7.0": "https://github.com/doctrine/doctrine2/commit/07fc401d255a4cdb4a557147d1c8a3fc7a0c718d.diff" + } + } } } diff --git a/composer.lock b/composer.lock index f3012c55507..6f635e150ce 100644 --- a/composer.lock +++ b/composer.lock @@ -197,6 +197,50 @@ ], "time": "2017-11-29T09:37:33+00:00" }, + { + "name": "cweagans/composer-patches", + "version": "1.6.5", + "source": { + "type": "git", + "url": "https://github.com/cweagans/composer-patches.git", + "reference": "2ec4f00ff5fb64de584c8c4aea53bf9053ecb0b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/2ec4f00ff5fb64de584c8c4aea53bf9053ecb0b3", + "reference": "2ec4f00ff5fb64de584c8c4aea53bf9053ecb0b3", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0", + "php": ">=5.3.0" + }, + "require-dev": { + "composer/composer": "~1.0", + "phpunit/phpunit": "~4.6" + }, + "type": "composer-plugin", + "extra": { + "class": "cweagans\\Composer\\Patches" + }, + "autoload": { + "psr-4": { + "cweagans\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cameron Eagans", + "email": "me@cweagans.net" + } + ], + "description": "Provides a way to patch Composer packages.", + "time": "2018-05-11T18:00:16+00:00" + }, { "name": "debril/rss-atom-bundle", "version": "v2.4.3", @@ -1226,6 +1270,9 @@ "extra": { "branch-alias": { "dev-master": "2.6.x-dev" + }, + "patches_applied": { + "#6991 Support PHP 7.3 without dropping support for 5.6/7.0": "https://github.com/doctrine/doctrine2/commit/07fc401d255a4cdb4a557147d1c8a3fc7a0c718d.diff" } }, "autoload": { @@ -8684,6 +8731,50 @@ ], "time": "2016-08-30T16:08:34+00:00" }, + { + "name": "composer/xdebug-handler", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "d17708133b6c276d6e42ef887a877866b909d892" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/d17708133b6c276d6e42ef887a877866b909d892", + "reference": "d17708133b6c276d6e42ef887a877866b909d892", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2019-01-28T20:25:53+00:00" + }, { "name": "facebook/webdriver", "version": "1.5.0", @@ -8741,24 +8832,24 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.2.16", + "version": "v2.2.20", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "f67918efb38a186c6c731e46e52eab4fee329a49" + "reference": "f1631f0747ad2a9dd3de8d7873b71f6573f8d0c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/f67918efb38a186c6c731e46e52eab4fee329a49", - "reference": "f67918efb38a186c6c731e46e52eab4fee329a49", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/f1631f0747ad2a9dd3de8d7873b71f6573f8d0c2", + "reference": "f1631f0747ad2a9dd3de8d7873b71f6573f8d0c2", "shasum": "" }, "require": { "composer/semver": "^1.4", + "composer/xdebug-handler": "^1.0", "doctrine/annotations": "^1.2", "ext-json": "*", "ext-tokenizer": "*", - "gecko-packages/gecko-php-unit": "^2.0", "php": "^5.3.6 || >=7.0 <7.3", "sebastian/diff": "^1.4", "symfony/console": "^2.4 || ^3.0 || ^4.0", @@ -8777,9 +8868,9 @@ "hhvm": "<3.18" }, "require-dev": { - "johnkary/phpunit-speedtrap": "^1.0.1", + "johnkary/phpunit-speedtrap": "^1.0.1 || ^2.0 || ^3.0", "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.0", + "keradus/cli-executor": "^1.1", "mikey179/vfsstream": "^1.6", "php-coveralls/php-coveralls": "^1.0.2", "phpunit/phpunit": "^4.8.35 || ^5.4.3", @@ -8787,17 +8878,14 @@ }, "suggest": { "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." }, "bin": [ "php-cs-fixer" ], "type": "application", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, "autoload": { "psr-4": { "PhpCsFixer\\": "src/" @@ -8828,7 +8916,7 @@ } ], "description": "A tool to automatically fix PHP code style", - "time": "2018-02-03T08:20:15+00:00" + "time": "2018-06-02T17:26:04+00:00" }, { "name": "gecko-packages/gecko-php-unit", @@ -10632,7 +10720,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.6.19 <7.3" + "php": ">=5.6.19 <7.4" }, "platform-dev": [], "platform-overrides": { diff --git a/upgrade.php b/upgrade.php index b66b83daa3c..5ae74a65b47 100644 --- a/upgrade.php +++ b/upgrade.php @@ -12,7 +12,7 @@ date_default_timezone_set('UTC'); define('MAUTIC_MINIMUM_PHP', '5.6.19'); -define('MAUTIC_MAXIMUM_PHP', '7.2.999'); +define('MAUTIC_MAXIMUM_PHP', '7.3.999'); // Are we running the minimum version? if (version_compare(PHP_VERSION, MAUTIC_MINIMUM_PHP, 'lt')) {