On Mon, May 27, 2024 at 14:21 Alexandru Pătrănescu <dreal...@gmail.com> wrote:
> > On Mon, May 27, 2024 at 7:16 AM Valentin Udaltsov < > udaltsov.valen...@gmail.com> wrote: > >> Hello, internals! >> >> Here's the idea: let's extract `ArrayAccess::offsetExists` and >> `ArrayAccess::offsetGet` methods into a separate `ArrayAccessRead` >> interface (name can be different) and allow read operations `$exists = >> isset($object['key'])` and `$value = $object['key']` for objects of classes >> that implement this interface. `ArrayAccess` will then extend >> `ArrayAccessRead` and add the remaining 2 methods. Looks like this change >> should not break backward compatibility. >> >> > Please check this: https://externals.io/message/122609#122609 where Gina > analyzed and proposed a solution for this. > It looks like the DimensionReadable is exactly the same thing. Maybe also > DimensionFetchable if you consider returning by reference. > > Maybe the improvement can be done in smaller incremental steps, but I > think it's better to agree on a complete solution for splitting ArrayAccess. > > Regards, > Alex > Wow! That's a great RFC with thorough analysis and an awesome proposal. Forget about my email 😄. Looking forward to news from Gina. -- Regards, Valentin Udaltsov