On Thu, 13 Apr 2023 at 13:40, Nicolas Grekas <nicolas.grekas+...@gmail.com>
wrote:

>
> I created this draft RFC to help move things forward:
>
> https://wiki.php.net/rfc/syntax-to-capture-variables-when-declaring-anonymous-classes
>
> Please let me know your early thoughts and I'd be happy to move it to
> "under discussion".
> I'd also need someone for the implementation as I doubt I'll be able to
> write it myself in a reasonable time!
>


Hi Nicolas!

Thanks, it's really encouraging to have some interest in the feature.

The good news is that I have an implementation of this nearly ready (it
passes all my tests, but the code's a bit messy). I was hoping to polish it
over the Easter weekend and draft a PR, but wasn't feeling very well.

It has full support for visibility, types, references, and property
renaming, but no merging of parameter lists or automatic call to the parent
constructor. I think with clean errors that's a good first feature set, and
if someone comes up with an implementation for manipulating existing
constructors, that can be proposed later.

So, "watch this space", as the saying goes :)

Regards,
-- 
Rowan Tommins
[IMSoP]

Reply via email to