rfc:mysql_deprecation
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:mysql_deprecation [2012/11/12 12:49] – created aharvey | rfc:mysql_deprecation [2012/11/28 06:12] – Slight clarification of the question breakdown. aharvey | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Request for Comments: ext/mysql deprecation ====== | ====== Request for Comments: ext/mysql deprecation ====== | ||
- | * Version: 1.0 | + | * Version: 1.1.2 |
- | * Date: 2012-11-12 | + | * Date: 2012-11-28 |
* Author: Adam Harvey < | * Author: Adam Harvey < | ||
- | * Status: | + | * Status: |
* First Published at: https:// | * First Published at: https:// | ||
* Trivial patch: http:// | * Trivial patch: http:// | ||
Line 9: | Line 9: | ||
This RFC proposes to generate E_DEPRECATED errors when connecting to a MySQL database with the ext/mysql API. | This RFC proposes to generate E_DEPRECATED errors when connecting to a MySQL database with the ext/mysql API. | ||
+ | |||
+ | ===== Voting ====== | ||
+ | |||
+ | Please note that there are two questions below: please vote on both if possible. The first controls the direct result of this RFC, while the second is to provide guidance should the RFC be rejected. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
+ | There are four options available for the next question: | ||
+ | |||
+ | If the vote to make ext/mysql generate E_DEPRECATED errors is unsuccessful, | ||
+ | |||
+ | * **(a)** Enhance the manual text to make the soft deprecation clearer, and generate E_DEPRECATED notices in PHP 5.6. | ||
+ | * **(b)** Enhance the manual text to make the soft deprecation clearer, but take no further action in terms of E_DEPRECATED for the forseeable future. | ||
+ | * **%%(c)%%** Remove the warnings from the manual and undeprecate ext/mysql entirely. | ||
+ | * **(d)** Do nothing. | ||
+ | |||
+ | <doodle title=" | ||
+ | > | ||
+ | * (a) | ||
+ | * (b) | ||
+ | * (c) | ||
+ | * (d) | ||
+ | </ | ||
===== Background ===== | ===== Background ===== | ||
Line 21: | Line 47: | ||
[[http:// | [[http:// | ||
+ | |||
+ | The proposed wording of the deprecation message is: | ||
+ | |||
+ | > The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead | ||
===== Why? ===== | ===== Why? ===== | ||
Line 33: | Line 63: | ||
> Moving away from ext/mysql is not only about security but also about having access to all features of the MySQL database. | > Moving away from ext/mysql is not only about security but also about having access to all features of the MySQL database. | ||
+ | > | ||
> ext/mysql was built for MySQL 3.23 and only got very few additions since then while mostly keeping compatibility with this old version which makes the code a bit harder to maintain. From top of my head missing features not support be ext/mysql include: | > ext/mysql was built for MySQL 3.23 and only got very few additions since then while mostly keeping compatibility with this old version which makes the code a bit harder to maintain. From top of my head missing features not support be ext/mysql include: | ||
* Stored Procedures (can't handle multiple result sets) | * Stored Procedures (can't handle multiple result sets) | ||
Line 45: | Line 75: | ||
None of those reasons have gone away. | None of those reasons have gone away. | ||
+ | |||
+ | Ulf Wendel has also written [[http:// | ||
===== Issues ===== | ===== Issues ===== | ||
Line 61: | Line 93: | ||
Some future release of PHP will presumably unbundle ext/mysql, at which point it can be moved out to PECL to slowly bitrot. That future release is not part of this RFC, however. | Some future release of PHP will presumably unbundle ext/mysql, at which point it can be moved out to PECL to slowly bitrot. That future release is not part of this RFC, however. | ||
+ | |||
+ | ===== Workarounds ===== | ||
+ | |||
+ | ==== Converting to MySQLi or PDO ==== | ||
+ | |||
+ | * http:// | ||
+ | |||
+ | ==== Suppressing deprecation warnings ==== | ||
+ | |||
+ | While code is being converted to MySQLi, E_DEPRECATED errors can be suppressed by setting error_reporting in php.ini to exclude E_DEPRECATED: | ||
+ | |||
+ | error_reporting = E_ALL ^ E_DEPRECATED | ||
+ | |||
+ | Note that this will also hide other deprecation warnings, however, which may be for things other than MySQL. | ||
===== Changelog ===== | ===== Changelog ===== | ||
- | * 2012-11-12: Initial version. | + | * 1.1.2 (2012-11-28): |
+ | * 1.1.1 (2012-11-19): | ||
+ | * 1.1 (2012-11-13): | ||
+ | * 1.0 (2012-11-12): Initial version. |
rfc/mysql_deprecation.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1