Hello everyone,
I gently began the process of softly deprecating ext/mysql. Basically,
all I did was add <note>'s to several ext/mysql functions (to demonstrate
the concept), and added a related <para> in the ext/mysql introduction.
Although the PHP community has been asking people to move away from
ext/mysql for years now, the idea here is to take the next [small] step
to make it both clearer and easier.
The aim of each <note> is to:
- Generally refer to the alternatives
(mysqli and pdo_mysql)
- Specify methods within said alternatives
(e.g., mysql_connect-> mysqli_connect|pdo::__construct)
Possible problems:
- Hidden (<note> is near the bottom, and mixed with other notes)
- Confusion (ext/mysql functions linking to ext/mysqli
functions)
The next step is to create a migration guide that will offer better
examples and detailed information. I'm not sure how exactly it'll look,
but I'm sure it'll be great. :)
At this time, we're okay to implement this soft deprecation although we
aren't even using the word "deprecation" so it's more informational than
deprecating. I don't feel like worrying about real deprecation at this
point which eventually will involve E_DEPRECATED, PECL, and ext/mysql
removal from php-src. Those steps are a long ways off.
If you find this troubling or see a better path then please speak up. Even
minor tweaks are welcome. I plan to add a <note> to every ext/mysql function
this upcoming week, then begin work on the migration guide. There's also
talk of a script to convert mysql to mysqli but that's not a priority at this
point.
And for the curious, here's a related thread on internals (from July 2011):
deprecating ext/mysql:
http://markmail.org/thread/yjlc5ken45cloyib
Regards,
Philip