On 19/01/2023 19:25, Ilija Tovilo wrote:
This has been suggested before and we're consider it. Here's a
comparable PHP implementation.
https://3v4l.org/6Ua8t
I'm confused what all the complexity here is doing. I get the same
result for that example with this one liner, using a tightly limite
> >
> > Mocking
> >
>
> This isn't a terribly compelling argument. Readonly classes are typically
> value objects; it's rare that you will mock them as they will be used as
> messages or results, and you'll end up doing assertions against them — not
> mocking them.
>
> Anything else it would enable
On 1/19/2023 12:40 PM, Marco Pivetta wrote:
Not just that, but `debug_backtrace()` already exists for that purpose.
I have use debug_backtrace() exactly for this purpose in the past. It
was to make a protected property readable/writable, but only by certain
"friend classes."
It's pretty tr
Am 24.01.2023 um 09:55 schrieb Máté Kocsis :
> We've just opened the vote for the "Readonly amendments" RFC, which is
> going to be open for 2 weeks (until 2023-02-07).
>
> Link: https://wiki.php.net/rfc/readonly_amendments
> Discussion: https://externals.io/message/119007
I like the idea of more
On Tue, Jan 24, 2023 at 12:06 PM Ollie Read wrote:
>
> You're absolutely correct, the problem I was trying to solve was the ability
> to reference a method without throwing around magic strings, apologies if
> that wasn't clear.
>
> The whole idea, or rather, need/want for it came about because
On Mon, 23 Jan 2023 at 16:27, Nicolas Grekas
wrote:
>
> Legit concerns. I'm going to prepare a more extensive use case so the
> motivations of RFC become more obvious.
>
> I'll get back on this thread when ready. Stay tuned :)
Please can you look at implementing it as a function, that returns a
m
You're absolutely correct, the problem I was trying to solve was the ability to
reference a method without throwing around magic strings, apologies if that
wasn't clear.
The whole idea, or rather, need/want for it came about because of time spent
with Javas functional side, though I understand
On Mon, 23 Jan 2023 at 23:03, Larry Garfield wrote:
>
> So you're saying that would generate a callable equivalent to:
>
> $fnMethod = fn (Zok $zok, string $zebranky): Frungy => $zok->Pik($zebranky);
Yes.
> (We're also now rather far afield from the OP's request, I think.)
Well, yeah. Deliberat
Hi Everyone,
We've just opened the vote for the "Readonly amendments" RFC, which is
going to be open for 2 weeks (until 2023-02-07).
Link: https://wiki.php.net/rfc/readonly_amendments
Discussion: https://externals.io/message/119007
Regards,
Máté Kocsis