Re: [RFC[ Property accessor hooks, take 2

From: Date: Tue, 12 Mar 2024 16:53:45 +0000
Subject: Re: [RFC[ Property accessor hooks, take 2
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-122624@lists.php.net to get a copy of this message
On Tue, Mar 12, 2024 at 4:36 PM Larry Garfield <larry@garfieldtech.com> wrote: > On Tue, Mar 12, 2024, at 8:49 AM, Stephen Reay wrote: > > > Hi Larry > > > > Thanks again for both of your work on this, I'm really hopeful this > passes. > > > > Was there ever any further discussion/resolution/decision about the use > > an explicit virtual keyword, and the related flag for > > creation of a > > backing store? I thought it was discussed by several people but I don't > > recall seeing any eventual consensus, and it looks to my eye that it > > hasn't changed from the original proposal: i.e. it's 'magic' and > > $this->{__PROPERTY__} won't work? > > > > Is that correct? > > We looked into virtual, and considered it, but determined that > it > wouldn't actually work because of inheritance. Details are in a new FAQ > entry: > > > https://wiki.php.net/rfc/property-hooks#why_no_explicit_virtual_flag > > > Nice that you added the details there why explicit virtual is not a good idea. So, if the parent class changes between virtual and non-virtual, while the child class is virtual, the only tiny BC break will be in the reflection as we will see a change between virtual and non-virtual? Alex

« previous php.internals (#122624) next »