Hi

On 7/16/24 13:04, Christoph M. Becker wrote:
See also a respective GH issue regarding deprecation messages:
<https://github.com/php/php-src/issues/14320>; it probably makes sense
to include an URL in the deprecation message, or maybe some code which
users can use to look up more thorough information about the deprecation.

To loop the list back in: I've replied to that issue that as part of the #[\Deprecated] RFC implementation new deprecation messages were added to (almost) all functions that are currently deprecated:

https://github.com/php/php-src/pull/14750

In case of utf8_decode() / utf8_encode() the message just points towards the documentation, but there is an extensive explanation discussing the possible alternatives, for the others the message already points out the alternatives or explains the deprecation in another way (e.g. for the *_free() functions that became obsolete when moving from resources to objects).

For uniqid() there are already various warnings in the documentation and today a PR was merged to adjust the description text to avoid using the word "unique", because it was factually untrue:

https://github.com/php/doc-en/pull/3571

If the deprecation is accepted, then the list of possible alternatives that are already mentioned in the RFC can be included in the documentation.

Best regards
Tim Düsterhus

Reply via email to