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

- Thread: https://externals.io/message/133174
- Original archive: https://news-web.php.net/php.internals/133174
- Started by Daniel Scherzer on 2026-11-21T22:53:27+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

---

## #133174 — Daniel Scherzer — 2026-11-21T22:53:27+00:00

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

Hi internals,

I'd like to start the discussion for a new RFC about being able to mark
interfaces as deprecated.

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

Thanks,
-Daniel

---

## #133175 — Larry Garfield — 2026-11-22T03:41:11+00:00

URL: https://externals.io/message/133174#133175 · In reply to: #133174

> Hi internals,
>
> I'd like to start the discussion for a new RFC about being able to mark 
> interfaces as deprecated.
>
> * RFC: https://wiki.php.net/rfc/deprecated_interfaces
> * Implementation: https://github.com/php/php-src/pull/21998
>
> Thanks,
> -Daniel

I somehow didn't even realize this wasn't already supported from the beginning.  Yes, this is an obvious addition.

--Larry Garfield

---

## #133182 — tim@bastelstu.be — 2026-11-22T15:20:04+00:00

URL: https://externals.io/message/133174#133182 · In reply to: #133174

Hi


> I'd like to start the discussion for a new RFC about being able to mark
> interfaces as deprecated.
> 
> * RFC: https://wiki.php.net/rfc/deprecated_interfaces
> * Implementation: https://github.com/php/php-src/pull/21998

I could swear that the discussion for this RFC had already started, 
perhaps it was just mentioned as future scope or got a passing mention 
in some other discussion instead. Anyway :-)

1. There is a typo in the “Comparison” table: You dropped the `p` in 
“ImlementsBase” (and the others).

2. I just added the “Abstain” option to the widget for you. The RFC 
probably predates that policy change.

3. The proposal makes sense to me and I agree that there is no room for 
further “improvements” regarding deprecating interfaces. Extending an 
interface and implementing an interface is the two places where an 
interface actively gets used.

Neither `instanceof` or using an interface in a type declaration should 
warn, since there is no way to avoid the deprecation there without 
actually making a breaking change. Those are “passive” consumers of an 
interface. It probably makes sense to at least spell out in the RFC how 
these consumers were considered and why they don't emit the deprecation 
notice.

Best regards
Tim Düsterhus
