From 7cd811dbcdd41fda3259f39c358ed7e754d85258 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 19 Aug 2019 17:29:32 -0700 Subject: [PATCH] (dev/drupal#79) CRM_Upgrade_Form - Raise MINIMUM_PHP_VERSION from 5.6 to 7.0 This version requirement officially went up to PHP 7.0 circa Civi 5.14. However, at that time, the upgrade metadata was kept at PHP 5.6 to allow somewhat softer landing for stragglers. That's no longer possible in 5.16+, so this just updates the requirement. Before ------ When upgrading via drush to Civi 5.16+ on PHP 5.6, the Civi class-loader fails to initialize. ``` Parse error: syntax error, unexpected ':', expecting '{' in /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/vendor/league/csv/src/functions.php on line 33 ``` (Approximate call-path: `civicrm.drush.inc` => `civicrm.settings.php` => `CRM_Core_ClassLoader` => `vendor/autoload.php` => `vendor/league/csv/src/functions.php`) After ----- It still fails, but at least the metadata is accurate. There will be a separate patch in another repo to make `drush` use this metadata and present a better error. --- CRM/Upgrade/Form.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Upgrade/Form.php b/CRM/Upgrade/Form.php index 008d42210a..d9561c3953 100644 --- a/CRM/Upgrade/Form.php +++ b/CRM/Upgrade/Form.php @@ -50,10 +50,9 @@ class CRM_Upgrade_Form extends CRM_Core_Form { /** * Minimum php version required to run (equal to or lower than the minimum install version) * - * Even though 5.6 is no longer supported, this value is left here for a while - * so as not to block stragglers from upgrading. + * As of Civi 5.16, using PHP 5.x will lead to a hard crash during bootstrap. */ - const MINIMUM_PHP_VERSION = '5.6'; + const MINIMUM_PHP_VERSION = '7.0.0'; /** * @var \CRM_Core_Config -- 2.25.1