All,
I've moved the ext/mysql deprecation RFC into the voting phase. You
can vote at https://wiki.php.net/rfc/mysql_deprecation — note that, as
discussed last week, there are two questions: the first being a simple
yes/no question (which will determine whether the RFC is accepted or
rejected), and the second to clarify what the preferred course of
action will be if the RFC is declined. Please vote on both, unless you
particularly wish to abstain from one of the questions.
I've also updated the RFC slightly, but not in a way that changes
what's actually proposed: Ulf noted that he wasn't comfortable with
having the Oracle Wiki link there for converting to MySQLi, so I've
replaced that link with another, more recent tutorial (albeit PDO
only) and added a link to Ulf's recent blog post about the benefits of
mysqli and PDO over ext/mysql. This is mostly useful for documentation
purposes, since I think there's general agreement that we should have
more resources covering upgrading to newer extensions regardless of
the outcome of this RFC.
At this stage, I intend to close the vote in a week's time: so
Wednesday, December 5.
Thanks,
Adam, who knows he's a little late with this, but being sick sucks. Sorry.
<big snip, voting open, et cetera>
OK, so the first e-mail was the official announcement of voting being
open. I'd now like to quickly lay out why I voted yes, and why I think
it's the right way forward. Feel free to hit next if your mind is
already made up. :)
Ulf produced a blackly entertaining timeline of MySQL support in PHP
in one of the earlier RFC threads[0]. We've had better options than
ext/mysql available in mainline, stable releases since 2004, yet it's
taken a long time for there to be a serious push to encourage users to
use the newer extensions.
There are both a carrot and a stick here. The carrot is well laid out
by Ulf in his blog post[1] — the newer extensions are more featureful,
faster, and in the case of PDO particularly, easier to use (and harder
to misuse). The stick is that we have this faintly ridiculous
situation where we have four extensions in php-src for accessing one
DBMS, one of which (ext/mysql) is barely maintained and has an API
that encourages poor programming practice.
Deprecating ext/mysql in PHP 5.5 doesn't mean it's going away
immediately. It doesn't even mean it's going away next year: there's
no reason at all we can't keep ext/mysql deprecated for more than one
release branch. In fact, that would be my preference. As others have
said: ext/mysql is a hugely used, popular extension. We can't rip it
out overnight, and nor should we.
Deprecation is a strong signal. It's a signal that it's time to update
tutorials. It's a signal to schedule upgrades for code when new
versions are written to use more modern APIs. It's a signal to those
of us who speak at conferences, and help people in various fora and
various ways that we should redouble our efforts to communicate the
benefits of MySQLi and/or PDO.
Most of all, it's a signal that we're serious about improving PHP and
encouraging our users to improve their own code with us.
Thanks for reading. If you got this far, I'll buy you the beer or
non-alcoholic substitute of your choice at any conference I'm at next
year. (Which, since I'm moving to Vancouver in the new year, may
actually be a few.)
Adam
[0] http://news.php.net/php.internals/63982
[1] http://blog.ulf-wendel.de/2012/php-mysql-why-to-upgrade-extmysql/
Adam Harvey wrote:
Deprecation is a strong signal. It's a signal that it's time to update
tutorials. It's a signal to schedule upgrades for code when new
versions are written to use more modern APIs. It's a signal to those
of us who speak at conferences, and help people in various fora and
various ways that we should redouble our efforts to communicate the
benefits of MySQLi and/or PDO.
Since I don't have karma to vote on line I need to raise my objections here.
There is no 'objection' to deprecating the extension, but adding E_DEPRECATED
to
the code is problematic since that should NOT be present in a PECL version of
the code? Adding it in one location and not the other does not make sense. ALL
that is needed is that the 'extension' is more difficult to access than the
preferred alternatives. When MySQL was dropped as 'automatically enabled' and
people kept asking 'Where is it?' people accepted the reasoning. Doing the same
thing now warning at the loading stage makes this much more practical, since
having to disable E_DEPRECATED
because of running legacy code and then loosing
also the IMPORTANT deprecated warnings is just wrong!
I'd almost make a case for moving the currently clean code to PECL now so we CAN
load a clean version of mysql if we need to do that. It's bundling it with other
deprecated code that is my problem :( Personally I'm only running MySQL to
support legacy code, and if this goes ahead then it's another reason to stop
upgrading from PHP5.4 ...
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
I voted "no", "(b)"
We should mention deprecation in manual as hard as possible, we should
mention it in ext/mysql/config.m4 and any other place we can reach.
Then, at some point (I'm fine with 5.6, but 6.0 would do also), we
should just move it to PECL, without using E_DEPRECATED
--
Alexey Zakhlestin,
http://github.com/indeyets
hi,
I voted "no", "(b)"
We should mention deprecation in manual as hard as possible, we should
mention it in ext/mysql/config.m4 and any other place we can reach.
Then, at some point (I'm fine with 5.6, but 6.0 would do also), we
should just move it to PECL, without usingE_DEPRECATED
That's exactly why we should use E_DEPRECATED
now and not in 5.x+1.
Also no way to kill it in 5.x, that would be worst than anything else.
That being said, let not start this thread, every argument has been
mentioned many times already. Let vote.
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
hi,
I voted "no", "(b)"
We should mention deprecation in manual as hard as possible, we should
mention it in ext/mysql/config.m4 and any other place we can reach.
Then, at some point (I'm fine with 5.6, but 6.0 would do also), we
should just move it to PECL, without usingE_DEPRECATED
That's exactly why we should use
E_DEPRECATED
now and not in 5.x+1.
Also no way to kill it in 5.x, that would be worst than anything else.
The idea of adding E_DEPRECATED
now, and then removing it in PECL, is
not an opinion held by everyone.
That being said, let not start this thread, every argument has been
mentioned many times already. Let vote.
The idea of moving it to PECL is not represented in the vote. But
it's something to consider as it's a real possibility. It could
both symbolize that we are serious about not using ext/mysql, and
considering most Linux distros would simply switch to offering the
PECL version, it'd probably not break much. Worth thinking about,
at least.
I'm not yet certain what we should do but this PECL topic is
intriguing. Hopefully a few others will weigh in with their related
thoughts.
Regards,
Philip
The idea of moving it to PECL is not represented in the vote. But
it's something to consider as it's a real possibility. It could
both symbolize that we are serious about not using ext/mysql, and
considering most Linux distros would simply switch to offering the
PECL version, it'd probably not break much. Worth thinking about,
at least.
Yes, in my eyes it is really pointless to start throwing deprecation
warnings and then move it to PECL. Please add the option of a direct
PECL-move to the second vote.
Nikita
I see it as simple to show E_DEPRECATED
but not when installed from PECL.
- Add a
int mysql_extension_triggers_deprecated_warning = 1;
And use it as a conditional for triggering the warning.
-
Copy the extension code to PECL
-
Add these changes in PECL
- If the mysql functions are not already registered,
register them with the bundled code. - Set mysql_extension_triggers_deprecated_warning = 0;
- That's it.
2012/11/28 Lester Caine lester@lsces.co.uk:
There is no 'objection' to deprecating the extension, but adding
E_DEPRECATED
to the code is problematic since that should NOT be present in
a PECL version of the code?
Sorry, but removing the E_DEPRECATED
notice when moved to PECL is not
part of the proposed RFC and should certainly not happen.
If ext/mysql is deprecated, it can perfectly live in PECL while
remaining deprecated. There ARE (supported) replacements for ext/mysql
and even if someone really one to use it, it should still be
considered deprecated regardless of the repository holding the code.
Adding it in one location and not the other does
not make sense.
Absolutely! There is no reason to remove that kind of notice in the future.
--
Patrick
Patrick ALLAERT wrote:
2012/11/28 Lester Cainelester@lsces.co.uk:
There is no 'objection' to deprecating the extension, but adding
E_DEPRECATED to the code is problematic since that should NOT be present in
a PECL version of the code?
Sorry, but removing theE_DEPRECATED
notice when moved to PECL is not
part of the proposed RFC and should certainly not happen.
If ext/mysql is deprecated, it can perfectly live in PECL while
remaining deprecated. There ARE (supported) replacements for ext/mysql
and even if someone really one to use it, it should still be
considered deprecated regardless of the repository holding the code.
Adding it in one location and not the other does
not make sense.
Absolutely! There is no reason to remove that kind of notice in the future.
Then perhaps a few more people will start complaining as well then. There is NO
reason to have deprecated messages on legacy packages in PECL no other older
packages have them? So why pick out this one?
This NOT the way to handle retiring well used legacy extensions and it just gets
in the way of using E_DEPRECATED
when it IS needed! At the very minimum we
should be able to ignore warnings when they are well understood without having
to hide everything else as well :(
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
From: Patrick ALLAERT
Sorry, but removing the
E_DEPRECATED
notice when moved to PECL is not part
of the proposed RFC and should certainly not happen.
I don't get what is the reason behind it?
Yes, the extension is old but it still works perfectly fine and even
outperforms the newer mysqli/pdo in some cases and noone will rewrite the
legacy apps - so why is there such a hate (I must say) for ISPs and platform
providers?
If you insist on throwing errors in external pecl extension for me as a
server farm administrator it won't leave any choice but to edit the
extension code / build custom distro package before putting it on
production.
rr
Patrick,
Sorry, but removing the E_DEPRECATED
notice when moved to PECL is not
part of the proposed RFC and should certainly not happen.
The proposal doesn't actually propose anything about a move to PECL. It's
listed in the "possible future actions" section exactly once. But the RFC
doesn't take a stand on it in either direction. So I'm not sure that you
can make that argument.
Adding it in one location and not the other does
not make sense.
Absolutely! There is no reason to remove that kind of notice in the future.
That's your opinion. Please realize it as such and that other viewpoints
also exist.
For example, I have the viewpoint that deprecation applies to the LANGUAGE.
The inclusion of the extension in the language is what's being deprecated.
Even after it's pulled, someone else can maintain it. We can say that you
should avoid it, but there's nothing stoping someone else from continuing
maintenance of it as a fork. And adding in the other missing functionality
(possibly breaking BC, possibly not, whatever).
Therefore, in my viewpoint, the deprecation notices only apply to the
inclusion of the extension in the core language distribution. Not to the
extension itself.
I'm not saying that either one of us is right or wrong, just that there are
other opinions. To keep this discussion productive, please refrain from
using absolutes like that...
Thanks
Anthony
On Wed, Nov 28, 2012 at 8:43 AM, Anthony Ferrara ircmaxell@gmail.comwrote:
Patrick,
Sorry, but removing the
E_DEPRECATED
notice when moved to PECL is notpart of the proposed RFC and should certainly not happen.
The proposal doesn't actually propose anything about a move to PECL. It's
listed in the "possible future actions" section exactly once. But the RFC
doesn't take a stand on it in either direction. So I'm not sure that you
can make that argument.Adding it in one location and not the other does
not make sense.
Absolutely! There is no reason to remove that kind of notice in the
future.That's your opinion. Please realize it as such and that other viewpoints
also exist.For example, I have the viewpoint that deprecation applies to the LANGUAGE.
The inclusion of the extension in the language is what's being deprecated.
Even after it's pulled, someone else can maintain it. We can say that you
should avoid it, but there's nothing stoping someone else from continuing
maintenance of it as a fork. And adding in the other missing functionality
(possibly breaking BC, possibly not, whatever).Therefore, in my viewpoint, the deprecation notices only apply to the
inclusion of the extension in the core language distribution. Not to the
extension itself.I'm not saying that either one of us is right or wrong, just that there are
other opinions. To keep this discussion productive, please refrain from
using absolutes like that...Thanks
Anthony
I think we're over-complicating this a bit. The whole point of
E_DEPRECATED
is to get people to stop using an obsolete feature before it's
removed (or moved to PECL or whatever; neither of which is in the scope of
this RFC anyway). Documentation and whatnot can only accomplish so much.
We also know that E_DEPRECATED
works when other approaches do not. I would
point you all to the famous example of Drupal 7, which would break
completely due to a flurry of E_DEPRECATED
warnings (if display_errors was
set to on) being triggered as of 5.3 due to their continued use of
magic_quotes_gpc and magic_quotes_runtime. When Drupal 8 was released some
time later, the code was fixed so that it no longer used those out-dated
functions.
That's why I voted yes.
--Kris
On Wed, Nov 28, 2012 at 8:43 AM, Anthony Ferrara ircmaxell@gmail.comwrote:
Patrick,
Sorry, but removing the
E_DEPRECATED
notice when moved to PECL is notpart of the proposed RFC and should certainly not happen.
The proposal doesn't actually propose anything about a move to PECL. It's
listed in the "possible future actions" section exactly once. But the RFC
doesn't take a stand on it in either direction. So I'm not sure that you
can make that argument.Adding it in one location and not the other does
not make sense.
Absolutely! There is no reason to remove that kind of notice in the
future.
That's your opinion. Please realize it as such and that other viewpoints
also exist.For example, I have the viewpoint that deprecation applies to the LANGUAGE.
The inclusion of the extension in the language is what's being deprecated.
Even after it's pulled, someone else can maintain it. We can say that you
should avoid it, but there's nothing stoping someone else from continuing
maintenance of it as a fork. And adding in the other missing functionality
(possibly breaking BC, possibly not, whatever).Therefore, in my viewpoint, the deprecation notices only apply to the
inclusion of the extension in the core language distribution. Not to the
extension itself.I'm not saying that either one of us is right or wrong, just that there are
other opinions. To keep this discussion productive, please refrain from
using absolutes like that...Thanks
Anthony
I think we're over-complicating this a bit. The whole point of
E_DEPRECATED
is to get people to stop using an obsolete feature before it's
removed (or moved to PECL or whatever; neither of which is in the scope of
this RFC anyway). Documentation and whatnot can only accomplish so much.We also know that
E_DEPRECATED
works when other approaches do not. I would
point you all to the famous example of Drupal 7, which would break
completely due to a flurry ofE_DEPRECATED
warnings (if display_errors was
set to on) being triggered as of 5.3 due to their continued use of
magic_quotes_gpc and magic_quotes_runtime. When Drupal 8 was released some
time later, the code was fixed so that it no longer used those out-dated
functions.That's why I voted yes.
--Kris
Kris,
There was no "ext/magic_quotes" that was retired to PECL. You're
comparing apples with oranges.
David
Kris,
There was no "ext/magic_quotes" that was retired to PECL. You're comparing
apples with oranges.David
I disagree. Whether we're deprecating an extension or a subset of
functions, the practical impact is pretty much the same. As for moving it
to PECL, why are we even discussing that here? It's completely outside the
scope of this RFC. I imagine moving it to PECL would make the most sense
when the time comes, but we shouldn't get ahead of ourselves. We should
deprecate it first, then when the time comes (i.e. 6.0) we can figure out
where to dump its carcas.
Either way, our common goal here is to get people to stop using ext/mysql
now so that we can trash it when the time comes. And as far as that goes,
I think that what happened with magic_quotes and Drupal is a perfect
example of how deprecation can effectively push devs to act when docs and
"get the word out" campaigns aren't enough.
--Kris
Kris,
I disagree. Whether we're deprecating an extension or a subset of
functions, the practical impact is pretty much the same. As for moving it
to PECL, why are we even discussing that here? It's completely outside the
scope of this RFC. I imagine moving it to PECL would make the most sense
when the time comes, but we shouldn't get ahead of ourselves. We should
deprecate it first, then when the time comes (i.e. 6.0) we can figure out
where to dump its carcas.
Actually, it is very much within the scope of this discussion.
Case in point, take a look at 5.3.0. The following extensions were moved to
PECL:
- ext/dbase
- ext/fbsql
- ext/fdf
- ext/ncurses
- ext/mhash (BC layer is now entirely within ext/hash)
- ext/ming
- ext/msql
- ext/sybase
Now you could make the argument that they weren't as used as ext/mysql. But
they were removed from core without raising E_DEPRECATED
first.
So there definitely is precedent to remove without deprecating first. So
it's completely within the realm of discussion here.
Either way, our common goal here is to get people to stop using ext/mysql
now so that we can trash it when the time comes. And as far as that goes,
I think that what happened with magic_quotes and Drupal is a perfect
example of how deprecation can effectively push devs to act when docs and
"get the word out" campaigns aren't enough.
The problem with this statement is that you're indicating something that
didn't happen. "get the word out" campaigns have not happened on an
official level for ext/mysql. The wording in the docs is light at best.
There has been very little effort from the side of the project to say "get
off it now". And that's what some of us have against this concept of
raising E_DEPRECATED
in 5.5 (or possibly ever)...
Anthony
hi Anthony,
As you are (relatively) new in php.net, let keep the history in mind
while comparing things.
Actually, it is very much within the scope of this discussion.
Case in point, take a look at 5.3.0. The following extensions were moved to
PECL:
- ext/dbase
- ext/fbsql
- ext/fdf
- ext/ncurses
- ext/mhash (BC layer is now entirely within ext/hash)
- ext/ming
- ext/msql
- ext/sybase
Now you could make the argument that they weren't as used as ext/mysql. But
they were removed from core without raisingE_DEPRECATED
first.
Back to this time, there was no release RFC and it was a simple +/- 1
vote to get an extension out of the distributions. So it is hardly
comparable to the current situation.
So there definitely is precedent to remove without deprecating first. So
it's completely within the realm of discussion here.
No there is not one, not since the RFC introduction. Removing
extension in minor (x.y+1 or x.y.z+1) is not allowed.
The problem with this statement is that you're indicating something that
didn't happen. "get the word out" campaigns have not happened on an
official level for ext/mysql. The wording in the docs is light at best.
There has been very little effort from the side of the project to say "get
off it now". And that's what some of us have against this concept of
raisingE_DEPRECATED
in 5.5 (or possibly ever)...
With the risk to repeat myself here (like 99.99% of the posts in this
thread), almost all major projects out there have zero issue with the
deprecation flag. They even agree to get it as it will help to
convince their developers and users to update their code and setups.
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
No there is not [precedent to remove from core without deprecating first], not since the RFC introduction. Removing
extension in minor (x.y+1 or x.y.z+1) is not allowed.
Moving an extension to PECL in a minor version increment is allowed,
per the release process RFC that was agreed to.
Case in point, take a look at 5.3.0. The following extensions were moved to
PECL:
- ext/dbase
- ext/fbsql
- ext/fdf
- ext/ncurses
- ext/mhash (BC layer is now entirely within ext/hash)
- ext/ming
- ext/msql
- ext/sybase
Now you could make the argument that they weren't as used as ext/mysql. But
they were removed from core without raisingE_DEPRECATED
first.
There is another argument: Those aren't deprecated. They were just
moved. Aside from mhash it is still fine to use those, we simply don't
bundle them anymore. For mhash there is an equivalent replacement in the
distribution.
With ext/mysql it is about "don't use this anymore. Use mysqli or such"
johannes
Kris Craig wrote:
Either way, our common goal here is to get people to stop using ext/mysql now so
that we can trash it when the time comes. And as far as that goes, I think that
what happened with magic_quotes and Drupal is a perfect example of how
deprecation can effectively push devs to act when docs and "get the word out"
campaigns aren't enough.
The use of 'Drupal' as an example is totally spurious here. E_DEPRECATED
and
E_STRICT
upgrades to any framework needed to be managed and in many cases
switching to later versions of PHP are ALWAYS linked to a new major version of
the framework. It is because the older versions are still expected to work with
older versions of PHP. I'm sure you will find today that most of these
frameworks ACTUALLY disable E_STRICT
and E_DEPRECATED
by default so that they
continue to run on on the range of PHP versions they were originally designed
for? Making something that only works with PHP5.4 is simply not practical when
the bulk of the hosting is still on PHP5.2! Drupal is not the only framework
that has to support it live user base.
This does return to something that people have got irritated with me before but
has been highlighted again here. Extensions are NOT core to PHP and most
distributions including the windows ones do not provide a single executable for
PHP but rather allow one to select what is loaded manually. I think it is quite
obvious that even if E_DEPRECATED
gets added to an 'official' distribution of
mysql in PHP, that this will get stripped back out by the distributions as
inappropriate in modular distributions? So why create the agro in the first place?
It IS the education that is missing ... but equally there ARE still valid
reasons to use mysql just as there are for the list of other retired extensions
listed here. Creating even more problems for users is simply counter productive
when there is STILL a need to educate users as to how to make their PHP5.2 code
'work' with PHP5.3/4 so that ISP's ARE in a position TO upgrade at all! And I
speak with my 'hosting' hat on here.
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
Kris Craig in php.internals (Wed, 28 Nov 2012 12:33:55 -0800):
We also know that
E_DEPRECATED
works when other approaches do not. I would
point you all to the famous example of Drupal 7, which would break
completely due to a flurry ofE_DEPRECATED
warnings (if display_errors was
set to on) being triggered as of 5.3 due to their continued use of
magic_quotes_gpc and magic_quotes_runtime. When Drupal 8 was released some
time later, the code was fixed so that it no longer used those out-dated
functions.
http://drupal.org/community-initiatives/drupal-core
Drupal 8 will not be released before August 2013. Maybe in the current
core the E_DEPRECATED
warnings are gone, but certainly not in many of
the modules.
People are still switching to Drupal7. And Drupal7 throws the watchdog
full with E_DEPRECATED
warnings when it is running onder PHP5.4. The
views module has issues with PHP 5.4, but some modules even let Drupal7
under PHP5.4 crash completely:
http://drupal.org/node/1831402
If E_DEPRECATED
stays in ext/mysql even after it has moved to PECL, the
result will be that more and more people turn E_DEPRECATED
warnings off.
Jan
My 0,02€
Could it be possible to add in "deprecated" field in the
zend_module_entry structure,
add 0 value in STANDARD_MODULE_PROPERTIES_EX
add 1 value in DEPRECATED_MODULE_PROPERTIES_EX (new constant)
And then, only throw a message during initial module load.
This will produce really less noice.
Regards,
Remi.
Kris Craig in php.internals (Wed, 28 Nov 2012 12:33:55 -0800):
We also know that
E_DEPRECATED
works when other approaches do not. I
would
point you all to the famous example of Drupal 7, which would break
completely due to a flurry ofE_DEPRECATED
warnings (if display_errors was
set to on) being triggered as of 5.3 due to their continued use of
magic_quotes_gpc and magic_quotes_runtime. When Drupal 8 was released
some
time later, the code was fixed so that it no longer used those out-dated
functions.http://drupal.org/community-initiatives/drupal-core
Drupal 8 will not be released before August 2013. Maybe in the current
core theE_DEPRECATED
warnings are gone, but certainly not in many of
the modules.People are still switching to Drupal7. And Drupal7 throws the watchdog
full withE_DEPRECATED
warnings when it is running onder PHP5.4. The
views module has issues with PHP 5.4, but some modules even let Drupal7
under PHP5.4 crash completely:
http://drupal.org/node/1831402If
E_DEPRECATED
stays in ext/mysql even after it has moved to PECL, the
result will be that more and more people turnE_DEPRECATED
warnings off.
I think you're forgetting though that the same applies to PHP itself. Many
repos still default to PHP 5.1.x. Adoption always tends to be a lagging
factor. I don't see any evidence to suggest that Drupal and other distros
have even slower adoption rates than PHP. In fact, the opposite seems to
be true from what I've observed.
In other words, most of these people you referenced who are still using
Drupal 6 are probably still using an older version of PHP as well.
Therefore, most people using Drupal 7 probably don't have to worry about
the deprecation because they haven't upgraded to 5.3.3+ yet. But it did
affect enough people that it forced the Drupal devs to update their code to
conform to the changes in PHP.
We shouldn't be targetting future PHP releases to sync with older distros
simply because many people still use them. Given that most people tend to
use older versions of PHP as well, I believe it's safe to say that the two
cancel one another out.
--Kris
Kris
I think you're forgetting though that the same applies to PHP itself. Many
repos still default to PHP 5.1.x. Adoption always tends to be a lagging
factor. I don't see any evidence to suggest that Drupal and other distros
have even slower adoption rates than PHP. In fact, the opposite seems to
be true from what I've observed.In other words, most of these people you referenced who are still using
Drupal 6 are probably still using an older version of PHP as well.
Therefore, most people using Drupal 7 probably don't have to worry about
the deprecation because they haven't upgraded to 5.3.3+ yet. But it did
affect enough people that it forced the Drupal devs to update their code to
conform to the changes in PHP.We shouldn't be targetting future PHP releases to sync with older distros
simply because many people still use them. Given that most people tend to
use older versions of PHP as well, I believe it's safe to say that the two
cancel one another out.
In my opinion, this attitude is the exact wrong one for core to take. We
should be trying to make adoption easier and removing barriers to projects
and hosts upgrading, not relying on the fact that they don't to justify our
actions.
If we make the lives easier for developers and hosts, then we won't have
the problems of lagging adoption. If we rely on the lagging adoption to
justify changes, then the circle feeds itself.
We shouldn't be relying on slow adoption for ANY decision. By doing that,
we're ensuring slow adoption. And slow adoption hurts EVERYONE. It hurts us
from the standpoint that we need to maintain software longer (or at least
there's pressure to). It hurts us from the standpoint that feedback on new
versions is reduced significantly. It hurts developers in that they can't
take advantage of new features. It hurts developer because software doesn't
get fixed for a long time. It hurts projects because they can't take
advantage of new features for a long time. It hurts hosts in that they
can't take advantage of performance improvements (that are sometimes very
significant).
The only group that benefits from long adoption cycles is the linux
distribution folks. Because the longer it takes for our stuff to get
adopted, the more it seems like their decision to have a long term version
sane. But if adoption of new versions is as seamless as possible, and easy
on everyone, then it makes that decision seem archaic and arbitrary.
Low barriers means everyone wins. High barriers just exacerbates everyone's
pain.
Let's push for low barriers...
Anthony
On Thu, Nov 29, 2012 at 10:03 AM, Anthony Ferrara ircmaxell@gmail.comwrote:
Kris
I think you're forgetting though that the same applies to PHP itself. Many
repos still default to PHP 5.1.x. Adoption always tends to be a lagging
factor. I don't see any evidence to suggest that Drupal and other distros
have even slower adoption rates than PHP. In fact, the opposite seems to
be true from what I've observed.In other words, most of these people you referenced who are still using
Drupal 6 are probably still using an older version of PHP as well.
Therefore, most people using Drupal 7 probably don't have to worry about
the deprecation because they haven't upgraded to 5.3.3+ yet. But it did
affect enough people that it forced the Drupal devs to update their code
to
conform to the changes in PHP.We shouldn't be targetting future PHP releases to sync with older distros
simply because many people still use them. Given that most people tend to
use older versions of PHP as well, I believe it's safe to say that the two
cancel one another out.In my opinion, this attitude is the exact wrong one for core to take. We
should be trying to make adoption easier and removing barriers to projects
and hosts upgrading, not relying on the fact that they don't to justify our
actions.If we make the lives easier for developers and hosts, then we won't have
the problems of lagging adoption. If we rely on the lagging adoption to
justify changes, then the circle feeds itself.We shouldn't be relying on slow adoption for ANY decision. By doing that,
we're ensuring slow adoption. And slow adoption hurts EVERYONE. It hurts us
from the standpoint that we need to maintain software longer (or at least
there's pressure to). It hurts us from the standpoint that feedback on new
versions is reduced significantly. It hurts developers in that they can't
take advantage of new features. It hurts developer because software doesn't
get fixed for a long time. It hurts projects because they can't take
advantage of new features for a long time. It hurts hosts in that they
can't take advantage of performance improvements (that are sometimes very
significant).The only group that benefits from long adoption cycles is the linux
distribution folks. Because the longer it takes for our stuff to get
adopted, the more it seems like their decision to have a long term version
sane. But if adoption of new versions is as seamless as possible, and easy
on everyone, then it makes that decision seem archaic and arbitrary.Low barriers means everyone wins. High barriers
just exacerbates everyone's pain.Let's push for low barriers...
Anthony
I do agree with you in principle, Anthony. What I'm saying is that the
reality !== the ideal. Slow adoption is just a fact of life. Every IT
person I've ever worked with was trained to be cautious and to "go with
what we know is stable and works, not with what's new." If distros like
Drupal were to get fast adoption and we were to get fast adoption, then
that would be super awesome. So long as out adoption rate isn't faster
than theirs (which I don't think it would be even if we tried), then these
barriers will not exist for most people because the distros will update
themselves to conform to PHP long before they ever upgrade anyway.
--Kris
hi Jan,
Kris Craig in php.internals (Wed, 28 Nov 2012 12:33:55 -0800):
We also know that
E_DEPRECATED
works when other approaches do not. I would
point you all to the famous example of Drupal 7, which would break
completely due to a flurry ofE_DEPRECATED
warnings (if display_errors was
set to on) being triggered as of 5.3 due to their continued use of
magic_quotes_gpc and magic_quotes_runtime. When Drupal 8 was released some
time later, the code was fixed so that it no longer used those out-dated
functions.http://drupal.org/community-initiatives/drupal-core
Drupal 8 will not be released before August 2013. Maybe in the current
core theE_DEPRECATED
warnings are gone, but certainly not in many of
the modules.
Drupal 7 supports PDO. There is no such thing like mysqli or mysql as driver.
People are still switching to Drupal7. And Drupal7 throws the watchdog
full withE_DEPRECATED
warnings when it is running onder PHP5.4. The
views module has issues with PHP 5.4, but some modules even let Drupal7
under PHP5.4 crash completely:
http://drupal.org/node/1831402
If there is a crash, a bug at bugs.php.net should be reported.
If
E_DEPRECATED
stays in ext/mysql even after it has moved to PECL, the
result will be that more and more people turnE_DEPRECATED
warnings off.
And? Where is the problem? The idea is to have it on in dev not in prod.
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Adam,
Thanks for opening voting.
However, I'd like to ask you to do something else here. Can you please
update the RFC to reflect the discussions that happened on list? Not
everything that was talked about, but the major discussion points at least.
That way it's there for future reference, and people who didn't read the
entire discussion thread can get a summary before they vote. As it sits
now, it doesn't really present all sides of the issue well...
Thanks
Anthony
All,
I've moved the ext/mysql deprecation RFC into the voting phase. You
can vote at https://wiki.php.net/rfc/mysql_deprecation — note that, as
discussed last week, there are two questions: the first being a simple
yes/no question (which will determine whether the RFC is accepted or
rejected), and the second to clarify what the preferred course of
action will be if the RFC is declined. Please vote on both, unless you
particularly wish to abstain from one of the questions.I've also updated the RFC slightly, but not in a way that changes
what's actually proposed: Ulf noted that he wasn't comfortable with
having the Oracle Wiki link there for converting to MySQLi, so I've
replaced that link with another, more recent tutorial (albeit PDO
only) and added a link to Ulf's recent blog post about the benefits of
mysqli and PDO over ext/mysql. This is mostly useful for documentation
purposes, since I think there's general agreement that we should have
more resources covering upgrading to newer extensions regardless of
the outcome of this RFC.At this stage, I intend to close the vote in a week's time: so
Wednesday, December 5.Thanks,
Adam, who knows he's a little late with this, but being sick sucks. Sorry.
However, I'd like to ask you to do something else here. Can you please
update the RFC to reflect the discussions that happened on list? Not
everything that was talked about, but the major discussion points at least.
That way it's there for future reference, and people who didn't read the
entire discussion thread can get a summary before they vote. As it sits now,
it doesn't really present all sides of the issue well...
I agree — I actually was hoping to update the RFC post-discussion to
reflect what had been discussed, but I've had a bit of a perfect storm
of problems this week that have prevented me from putting any real
time into PHP matters.
I can have a look at revising the RFC on the weekend, but if you or
someone else wanted to summarise the main "no" position and insert it
before that, I'd have absolutely no objections.
Thanks,
Adam
2012/11/28 Adam Harvey aharvey@php.net:
At this stage, I intend to close the vote in a week's time: so
Wednesday, December 5.
+1 for deprecation in 5.5
--
regards,
Kalle Sommer Nielsen
kalle@php.net