On Wed, Mar 29, 2023, at 7:53 PM, Zoltán Fekete wrote:
> Hi,
>
> [Proposal]
> Allow interfaces to define properties. The implementing class must
> have the same properties with  the same name/type.
>
> As the goal of the interfaces is to define the public "surface" of
> the implementing class, I think that the public properties are also
> part of that.

This is a part of the "Property Hooks" RFC that Ilija and are working on.  It's 
not *quite* done yet, but it's mostly there.  The draft is available here: 
https://wiki.php.net/rfc/property-hooks

The main thing we still have to sort out is serialization handling.  Everything 
else is pretty well stable, including defining properties asymmetrically in 
interfaces.

We hope to have it finalized and ready for discussion within the next 
month-or-less.  (Fingers crossed.)

--Larry Garfield

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to