Re: Re: [RFC] Deprecations for PHP 8.1

From: Date: Fri, 18 Jun 2021 23:03:40 +0000
Subject: Re: Re: [RFC] Deprecations for PHP 8.1
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-114967@lists.php.net to get a copy of this message
On 18/06/2021 22:16, Derick Rethans wrote:
strftime is infected by thread unsafe locales, which is plenty of reason to deprecate it, with additional pro reasons for doing so being its disparate functionality among different os-es and libc's. Deprecation also doesn't mean removal, which won't happen until PHP 9, giving developers plenty of time to move to a saner threadsafe locale API based on intl/icu.
I think you're probably right, but I think in general deprecations should be accompanied by much stronger migration instructions than "there's a class over here that probably does what you want if you kick it a bit". Like everything in ext/intl, IntlDateFormatter is rather complex, and the manual relies heavily on links to the ICU documentation, some of which are 404s. If you're saying my 276 uses of strftime() are "wrong", it would be nice to have a clear message of what is "right", and what I should do to "fix" them. If the alternative is definitely there, and the deprecation is accompanied by an effort to document it clearly, then my objection goes away. Regards, -- Rowan Tommins [IMSoP]

« previous php.internals (#114967) next »