Hello everyone,
First post here, so please be gentle and pedagogic with me if I am
misbehaviouring…
I am here for a pre-RFC feedback. It’s not coding related, but more about
convention.
I’m a follower of the french mailing list about php internals where we
discuss, chiefly thanks to Pascal Martin, where does the french php
community stand regarding RFC.
Now and then, debates about RFC on the mailing list are polluted by this
simple argument : “What!!!? That should not be done in minor version, but
go for major!”. (recently, it was triggered by this one:
https://wiki.php.net/rfc/remove_utf_8_decode_encode)
With some pals of this mailing list, we came to wrote this draft of RFC:
objective : Write and follow a deprecation convention for PHP
draft : https://github.com/gorghoa/the-deprecated-rfc/blob/master/RFC.doku
tl;dr: If it’s a BC, deprecate in next minor version unless it’s security
related
May we have your feedback on such proposal? Is it the right place to
discuss it?
Best regards,
--
Rodrigue Villetard
Hi Rodrigue,
On Fri, Aug 19, 2016 at 10:45 PM, Rodrigue Villetard
rodrigue.villetard@gmail.com wrote:
First post here, so please be gentle and pedagogic with me if I am
misbehaviouring…I am here for a pre-RFC feedback. It’s not coding related, but more about
convention.I’m a follower of the french mailing list about php internals where we
discuss, chiefly thanks to Pascal Martin, where does the french php
community stand regarding RFC.Now and then, debates about RFC on the mailing list are polluted by this
simple argument : “What!!!? That should not be done in minor version, but
go for major!”. (recently, it was triggered by this one:
https://wiki.php.net/rfc/remove_utf_8_decode_encode)With some pals of this mailing list, we came to wrote this draft of RFC:
objective : Write and follow a deprecation convention for PHP
draft : https://github.com/gorghoa/the-deprecated-rfc/blob/master/RFC.dokutl;dr: If it’s a BC, deprecate in next minor version unless it’s security
relatedMay we have your feedback on such proposal? Is it the right place to
discuss it?
+1 for having a general guideline for depreciation and removal.
Although I'm radical about utf8_decode/encode deprecation to get more
attentions/opinions for utf8_encode/decode removal, I think following
procedure would be good for a feature removal.
- Document deprecation to the manual at any time. (Feature may be kept forever)
- Raise
E_DEPRECATED
error on next major version. (If it should be
removed in the future) - Remove deprecated feature on next major version. (Remove it if it
should be removed)
So if we decide to remove something now, actual removal will be PHP 9.
P.S. utf8_decode/encode are "Shouldn't use functions" as they make
code non I18N needlessly. According to the code, original author's
intention was to implement various encoding support. I guess this
wouldn't happen anymore.
--
Yasuo Ohgaki
yohgaki@ohgaki.net
P.S. utf8_decode/encode are "Shouldn't use functions" as they make
code non I18N needlessly. According to the code, original author's
intention was to implement various encoding support. I guess this
wouldn't happen anymore.
Is there any well documented alternative way of achieving the same
results as provided by these functions? Much of the time there is
on-list debates on how something should be done, but it gets somewhat
watered down in a migration guide ... if it makes it there at all.
I keep saying it ... just where is the 'best practice' guide to using
all the 'new' features of PHP?
--
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
Is there any well documented alternative way of achieving the same
results as provided by these functions? Much of the time there is
on-list debates on how something should be done, but it gets somewhat
watered down in a migration guide ... if it makes it there at all.
In this specific case, look at
http://php.net/manual/en/function.iconv.php or
http://php.net/manual/en/function.mb-convert-encoding.php
But in general, yes, as Dave Walker mentioned, documenting proper
migration steps should be a standard part of any deprecation.
Much as I appreciate the Meaningless Internet Points it's earning me,
this Stack Overflow post explaining preg_replace_callback should really
have been a prominently-linked page in the official manual:
http://stackoverflow.com/a/15454454/157957
Regards,
Rowan Collins
[IMSoP]