# [RFC] [Discussion] #[\Deprecated] for traits

- Thread: https://externals.io/message/127912
- Original archive: https://news-web.php.net/php.internals/127912
- Started by Daniel Scherzer on 2025-07-05T23:30:01+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #127912 — Daniel Scherzer — 2025-07-05T23:30:01+00:00

URL: https://externals.io/message/127912#127912

Hi internals,

I'd like to start the discussion for a new RFC about adding support for
#[\Deprecated] on traits.

* RFC: https://wiki.php.net/rfc/deprecated_traits
* Implementation: https://github.com/php/php-src/pull/19045

--Daniel

---

## #127915 — tim@bastelstu.be — 2025-07-06T11:20:03+00:00

URL: https://externals.io/message/127912#127915 · In reply to: #127912

Hi


> I'd like to start the discussion for a new RFC about adding support for
> #[\Deprecated] on traits.
> 
> * RFC: https://wiki.php.net/rfc/deprecated_traits
> * Implementation: https://github.com/php/php-src/pull/19045

Thank you. That makes sense to me. On a first look, I agree that 
`use`ing a trait is the single and obvious point where the message for a 
deprecated trait should be emitted and can't think of anything else.

Best regards
Tim Düsterhus

---

## #128169 — Daniel Scherzer — 2025-07-21T21:36:05+00:00

URL: https://externals.io/message/127912#128169 · In reply to: #127912

On Sat, Jul 5, 2025 at 4:30 PM Daniel Scherzer <daniel.e.scherzer@gmail.com>
wrote:

> Hi internals,
>
> I'd like to start the discussion for a new RFC about adding support for
> #[\Deprecated] on traits.
>
> * RFC: https://wiki.php.net/rfc/deprecated_traits
> * Implementation: https://github.com/php/php-src/pull/19045
>
> --Daniel
>


Given the lack of further feedback outside of Tim's comment, either here or
on GitHub, I plan to open the vote in the next few days.

-Daniel
