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]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to