Re: #[Deprecated] Attribute
| From: | G. P. B. | Date: | Sun, 10 Jan 2021 01:48:28 +0000 |
| Subject: | Re: #[Deprecated] Attribute | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-112826@lists.php.net to get a copy of this message | ||
On Sat, 19 Dec 2020 at 10:19, Benjamin Eberlei <kontakt@beberlei.de> wrote:
> Hi internals,
>
> I have updated the RFC for a #[Deprecated] attribute that wasn't completed
> for PHP 8.0 due to time constraints and I am able to restart the discussion
> now.
>
> https://wiki.php.net/rfc/deprecated_attribute
>
> The following updates have been made:
>
> - focus on only method and function deprecations for now, removed
> class/property/constant deprecations.
> - a section on explaining the runtime effects of deprecations in PHP, and a
> note that this RFC is about completing deprecation support within the
> existing model, while changes to deprecations in general are out of scope /
> a disjunct concern for a different RFC.
>
> Sara proposed a much improved implementation over my initial patch, by
> using the already existing ZEND_ACC_DEPRECATED constant on userland
> functions. The resulting implementation is therefore much simpler and
> really just extending existing function deprecation support from internal
> to userland functions. You can find the PR here:
>
> https://github.com/php/php-src/pull/6521
>
> Let me know what you think.
>
> greetings
> Benjamin
>
Just to clarify this raises an E_DEPRECATED right?
Could it make sense to raise E_USER_DEPRECATED instead?
Best regards,
George P. Banyard