From 7739276026f70c7f5309ad10f9788bd575edb464 Mon Sep 17 00:00:00 2001 From: Seb35 Date: Fri, 30 Dec 2016 16:13:02 +0100 Subject: [PATCH] Soft deprecation of DatabaseMysql This class is the driver for MySQL databases corresponding to the PHP extension 'mysql'. This PHP extension was deprecated in PHP 5.5 and removed in PHP 7.0. It was replaced by the PHP extension 'mysqli', which is supported and the default MySQL driver since MediaWiki 1.22. Bug: T120333 Change-Id: Id1478f73e348cdd1ad1f560b1d8ddefe56c52767 --- RELEASE-NOTES-1.30 | 4 ++++ includes/libs/rdbms/database/Database.php | 2 +- includes/libs/rdbms/database/DatabaseMysql.php | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30 index 452cb35b2c..38e5f99cfb 100644 --- a/RELEASE-NOTES-1.30 +++ b/RELEASE-NOTES-1.30 @@ -33,6 +33,10 @@ section). use $wgFragmentMode to migrate off it to a modern alternative. * $wgExternalInterwikiFragmentMode was introduced to control how fragments in sinterwikis going outside of current wiki farm are encoded. +* (T120333) Soft-deprecated the use of PHP extension 'mysql' in favor of 'mysqli'. + This PHP extension was deprecated in PHP 5.5 and removed in PHP 7.0. MediaWiki + auto-selects the 'mysqli' driver since MediaWiki 1.22, except if explicitly + requested through the configuration parameter $wgDBservers. === New features in 1.30 === * (T37247) Output from Parser::parse() will now be wrapped in a div with diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index b8b44e698e..a3b4bca24f 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -2078,7 +2078,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * Quotes an identifier using `backticks` or "double quotes" depending on the database type. * MySQL uses `backticks` while basically everything else uses double quotes. * Since MySQL is the odd one out here the double quotes are our generic - * and we implement backticks in DatabaseMysql. + * and we implement backticks in DatabaseMysqlBase. * * @param string $s * @return string diff --git a/includes/libs/rdbms/database/DatabaseMysql.php b/includes/libs/rdbms/database/DatabaseMysql.php index 77e797d49c..d81d9096fd 100644 --- a/includes/libs/rdbms/database/DatabaseMysql.php +++ b/includes/libs/rdbms/database/DatabaseMysql.php @@ -25,6 +25,9 @@ namespace Wikimedia\Rdbms; /** * Database abstraction object for PHP extension mysql. * + * @deprecated 1.30 PHP extension 'mysql' was deprecated in PHP 5.5 and removed in PHP 7.0. + * @see PHP extension 'mysqli' and DatabaseMysqli + * * @ingroup Database * @see Database */ -- 2.20.1