Re: [PHP-DEV] Allow properties to be defined on interface
Hi Claude, > For information, the question of properties on interfaces is covered by the > currently discussed RFC “Property hooks”: > https://wiki.php.net/rfc/property-hooks I only half-understand that RFC. Thanks for pointing me out. Regards. Saki
[PHP-DEV] Allow properties to be defined on interface
Hi Larry, > This functionality is included in the Property Hooks RFC, which will be going > to a vote just as soon as Ilija finishes polishing up the test suite for it. > (I think he wants to get it into a "commit as soon as the vote passes" state > before we call the vote, even though that's not process-required.) Oops, I haven't fully figured out that RFC yet and didn't realize my suggestion was included. Thanks for pointing that out! Regards. Saki
Re: [PHP-DEV] Allow properties to be defined on interface
Hi Larry, > This functionality is included in the Property Hooks RFC, which will be going > to a vote just as soon as Ilija finishes polishing up the test suite for it. > (I think he wants to get it into a "commit as soon as the vote passes" state > before we call the vote, even though that's not process-required.) Oops, I haven't fully figured out that RFC yet and didn't realize my suggestion was included. Thanks for pointing that out! Regards. Saki
Re: [PHP-DEV] Allow properties to be defined on interface
> Le 28 mars 2024 à 16:03, Saki Takamachi a écrit : > > Therefore, I propose to allow public properties to be defined on the > interface (It does not matter whether it is read-only or not). > Hi, For information, the question of properties on interfaces is covered by the currently discussed RFC “Property hooks”: https://wiki.php.net/rfc/property-hooks —Claude
Re: [PHP-DEV] Allow properties to be defined on interface
On Thu, Mar 28, 2024, at 3:03 PM, Saki Takamachi wrote: > Hi internals, > > With read-only properties, we no longer need to define getter methods > when we can take advantage of them. > > However, there is still one problem here from a convenience standpoint. > That is if we use an interface, we still need to define a getter method. > > This was mentioned by @sakurairo in X > > > Therefore, I propose to allow public properties to be defined on the > interface (It does not matter whether it is read-only or not). > > I would like to hear your feedback. > Also, if a similar discussion has taken place before, I would > appreciate it if you could let me know. > > Regards. > > Saki This functionality is included in the Property Hooks RFC, which will be going to a vote just as soon as Ilija finishes polishing up the test suite for it. (I think he wants to get it into a "commit as soon as the vote passes" state before we call the vote, even though that's not process-required.) https://wiki.php.net/rfc/property-hooks#interfaces --Larry Garfield
[PHP-DEV] Allow properties to be defined on interface
Hi internals, With read-only properties, we no longer need to define getter methods when we can take advantage of them. However, there is still one problem here from a convenience standpoint. That is if we use an interface, we still need to define a getter method. This was mentioned by @sakurairo in X Therefore, I propose to allow public properties to be defined on the interface (It does not matter whether it is read-only or not). I would like to hear your feedback. Also, if a similar discussion has taken place before, I would appreciate it if you could let me know. Regards. Saki