# [Vote] Asymmetric visibility v2

- Thread: https://staging.externals.io/message/124622
- Original archive: https://news-web.php.net/php.internals/124622
- Started by Larry Garfield on 2024-07-26T18:25:53+00:00
- Messages: 9
- RFC: Asymmetric visibility v2 (Implemented (PHP 8.4)) — https://staging.externals.io/rfc/asymmetric-visibility-v2.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://staging.externals.io/search.md?q={query} · RFCs at https://staging.externals.io/rfc.md · JSON API at https://staging.externals.io/api · documentation at https://staging.externals.io/llms.txt

---

## #124622 — Larry Garfield — 2024-07-26T18:25:53+00:00

URL: https://staging.externals.io/message/124622#124622

Voting for Asymmetric Visibility is now open.

https://wiki.php.net/rfc/asymmetric-visibility-v2

The vote will end on 9 February, probably afternoonish in my timezone.

-- 
  Larry Garfield
  larry@garfieldtech.com

---

## #124623 — Andreas Heigl — 2024-07-26T18:39:16+00:00

URL: https://staging.externals.io/message/124622#124623 · In reply to: #124622

> Voting for Asymmetric Visibility is now open.
> 
> https://wiki.php.net/rfc/asymmetric-visibility-v2
> 
> The vote will end on 9 February, probably afternoonish in my timezone.
> 

That's a pretty long voting period...
--
Andreas Heigl

---

## #124624 — Bilge — 2024-07-26T18:54:23+00:00

URL: https://staging.externals.io/message/124622#124624 · In reply to: #124622

>
> Presumably the proposed PHP version is wrong?

---

## #124625 — Larry Garfield — 2024-07-26T19:46:39+00:00

URL: https://staging.externals.io/message/124622#124625 · In reply to: #124622

> Voting for Asymmetric Visibility is now open.
>
> https://wiki.php.net/rfc/asymmetric-visibility-v2
>
> The vote will end on 9 February, probably afternoonish in my timezone.
>
> -- 
>   Larry Garfield
>   larry@garfieldtech.com

Sigh.  And of course I meant the voting will end on 9 AUGUST, aka, two weeks from today.  (No idea where that came from.)

--Larry Garfield

---

## #124626 — Larry Garfield — 2024-07-26T19:47:43+00:00

URL: https://staging.externals.io/message/124622#124626 · In reply to: #124624

> > […]

No, this is still within the window to target 8.4.

--Larry Garfield

---

## #124628 — Bilge — 2024-07-26T21:15:48+00:00

URL: https://staging.externals.io/message/124622#124628 · In reply to: #124623

> 
> > […]
> That's a pretty long voting period...

It seems he meant the 9th of August.

---

## #124768 — Theodore Brown — 2024-08-05T13:49:25+00:00

URL: https://staging.externals.io/message/124622#124768 · In reply to: #124622

> Voting for Asymmetric Visibility is now open.
>
> https://wiki.php.net/rfc/asymmetric-visibility-v2

Hi Larry and Ilija,

Thank you for all your work on this RFC!

One part that doesn't make sense to me is this sentence near the end in the "Readonly is incompatible with inheritance" section:

> With asymmetric visibility, the `readonly` usage here can be replaced with `protected protected(set)` or `readonly protected protected(set)`, avoiding the need to double-declare properties.

`protected protected(set)` just removes readonly, and is the same as `protected`, right? So couldn't such a change be done now without asymmetric visibility?

And the change to `protected protected(set) readonly` as shown in the example also seems unnecessary, since earlier in the RFC it says that readonly will be changed to imply `protected(set)` rather than `private(set)`. So it seems that no change is needed to the abstract class here - the properties can remain `protected readonly`, and the implementation can be simplified since readonly properties will now imply `protected(set)`.

Or have I misunderstood something here?

Thanks,
Theodore

---

## #124770 — Larry Garfield — 2024-08-05T15:36:39+00:00

URL: https://staging.externals.io/message/124622#124770 · In reply to: #124768

> 
>
> > […]
>
> Hi Larry and Ilija,
>
> Thank you for all your work on this RFC!
>
> One part that doesn't make sense to me is this sentence near the end in 
> the "Readonly is incompatible with inheritance" section:
>
> > […]
>
> `protected protected(set)` just removes readonly, and is the same as 
> `protected`, right? So couldn't such a change be done now without 
> asymmetric visibility?
>
> And the change to `protected protected(set) readonly` as shown in the 
> example also seems unnecessary, since earlier in the RFC it says that 
> readonly will be changed to imply `protected(set)` rather than 
> `private(set)`. So it seems that no change is needed to the abstract 
> class here - the properties can remain `protected readonly`, and the 
> implementation can be simplified since readonly properties will now 
> imply `protected(set)`.
>
> Or have I misunderstood something here?

I believe in this case you're correct.  That example was written early on, before we decided to expand readonly to protected(set) by default.  I didn't realize that needed to be updated as well.  Yes, in this case, the widening of readonly would also resolve that issue.  `protected protected(set)` would now be redundant, but not hurt anything, whereas `protected private(set)` would have an effect.  `public public(set) readonly` would also be legal (though I don't personally know why you'd do that, there's no inherent reason to make it illegal).

--Larry Garfield

---

## #124838 — Larry Garfield — 2024-08-10T13:40:42+00:00

URL: https://staging.externals.io/message/124622#124838 · In reply to: #124622

> Voting for Asymmetric Visibility is now open.
>
> https://wiki.php.net/rfc/asymmetric-visibility-v2
>
> The vote will end on 9 February, probably afternoonish in my timezone.

I have now closed the vote on this RFC.

The final result is 24 Yes, 7 No, for a total of 77.4% in favor.

The RFC has passed.  Thanks everyone for your participation and input.  Ilija will get the PR merged soonish.

--Larry Garfield
