Hi

On 11/21/26 23:53, Daniel Scherzer wrote:
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

Reply via email to