Skip to content
Snippets Groups Projects
Commit f7738e49 authored by Seamus Lee's avatar Seamus Lee
Browse files

#1681 Add in notice about 5.28 Dropping MySQL 5.5 Support

parent ac230044
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,13 @@ class CRM_Upgrade_Incremental_General {
*/
const MIN_INSTALL_MYSQL_VER = '5.5';
/**
* The minimum MySQL/MariaDB version required to install Civi.
*
* @see install/index.php
*/
const NEW_MIN_INSTALL_MYSQL_VER = '5.6.5';
/**
* Compute any messages which should be displayed before upgrade.
*
......@@ -77,6 +84,25 @@ class CRM_Upgrade_Incremental_General {
]);
$preUpgradeMessage .= '</p>';
}
if (version_compare(CRM_Utils_SQL::getDatabaseVersion(), self::MIN_RECOMMENDED_MYSQL_VER) < 0 && version_compare(CRM_Utils_SQL::getDatabaseVersion(), self::NEW_MIN_INSTALL_MYSQL_VER) >= 0) {
$preUpgradeMessage .= '<p>';
$preUpgradeMessage .= ts('You may proceed with the upgrade and CiviCRM %1 will continue working normally, but future releases will require MySQL version %2 or above or MariaDB version %3 or above.', [
1 => $latestVer,
2 => self::MIN_RECOMMENDED_MYSQL_VER,
3 => '10.1',
]);
$preUpgradeMessage .= '</p>';
}
if (version_compare(CRM_Utils_SQL::getDatabaseVersion(), self::NEW_MIN_INSTALL_MYSQL_VER) < 0) {
$preUpgradeMessage .= '<p>';
$preUpgradeMessage .= ts('You may proceed with the upgrade and CiviCRM %1 will continue working normally, but CiviCRM versions from 5.28 onwards will require at least MySQL version %1. It is recommended to use MySQL version %3 or above or MariaDB version %4 or above.', [
1 => $latestVer,
2 => self::NEW_MIN_INSTALL_MYSQL_VER,
3 => self::MIN_RECOMMENDED_MYSQL_VER,
4 => '10.1',
]);
$preUpgradeMessage .= '</p>';
}
// http://issues.civicrm.org/jira/browse/CRM-13572
// Depending on how the code was upgraded, some sites may still have copies of old
......
......@@ -949,10 +949,37 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component {
3 => '10.1',
]),
ts('MySQL Out of date'),
\Psr\Log\LogLevel::ERROR,
'fa-server'
);
}
elseif (version_compare(CRM_Utils_SQL::getDatabaseVersion(), CRM_Upgrade_Incremental_General::NEW_MIN_INSTALL_MYSQL_VER, '<')) {
$messages[] = new CRM_Utils_Check_Message(
__FUNCTION__,
ts('This system uses MySQL/MariaDB version %1. CiviCRM versions 5.28 and onwards will require MySQL version at least %2, however MySQL version %3 or MariaDB version %4 is recommended', [
1 => $version,
2 => CRM_Upgrade_Incremental_General::NEW_MIN_INSTALL_MYSQL_VER,
3 => $minRecommendedVersion,
4 => '10.1',
]),
ts('MySQL Out of date'),
\Psr\Log\LogLevel::WARNING,
'fa-server'
);
}
elseif (version_compare(CRM_Utils_SQL::getDatabaseVersion(), $minRecommendedVersion, '<')) {
$messages[] = new CRM_Utils_Check_Message(
__FUNCTION__,
ts('This system uses MySQL/MariaDB version %1. You can continue to use that version of MySQL however support for it is likely to be removed shortly, MySQL version %2 or MariaDB version %3 is recommended', [
1 => $version,
2 => $minRecommendedVersion,
3 => '10.1',
]),
ts('MySQL Out of date'),
\Psr\Log\LogLevel::NOTICE,
'fa-server'
);
}
return $messages;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment