On Sun, 10 May 2026 at 20:02, Seifeddine Gmati <[email protected]> wrote: > > Hello Internals, > > I'd like to start the discussion on a new RFC adding bound-erased > generics types to PHP. > > Generic type parameters can be declared on classes, interfaces, > traits, functions, methods, closures, and arrow functions, with > bounds, defaults, and variance markers. Type parameters erase to their > bound at runtime; the pre-erasure form is preserved for Reflection and > consumed by static analyzers. > > - RFC: https://wiki.php.net/rfc/bound_erased_generic_types > - Implementation: https://github.com/php/php-src/pull/21969 > > Thanks, > Seifeddine.
Hello internals, This is the Intent to Vote message for the Bound-Erased Generic Types RFC. The discussion thread opened on May 10. The RFC text has been stable for the last 14 days, no further Major or Minor changes are pending, and the recent activity in the thread has been around adjacent topics rather than feedback requiring changes to the RFC itself. I plan to open voting on 2026-06-14. If any new substantive feedback comes in during that window, I'll treat it the same as feedback raised earlier in the thread, and any Major or Minor change to the RFC text will reset the cooldown and cancel this Intent to Vote, per policy. The vote will run for 14 days and will be announced in a separate [VOTE] thread once it opens. There will be two questions on the RFC: 1. Primary, 2/3 majority required: accept the RFC as a whole. 2. Secondary, simple majority, conditional on the primary passing: variance marker syntax, `+T` / `-T` (Hack, Scala) vs `in T` / `out T` (C#, Kotlin). Semantically identical; only the surface syntax differs. RFC: https://wiki.php.net/rfc/bound_erased_generic_types Implementation: https://github.com/php/php-src/pull/21969 Thanks to everyone who engaged with this over the past month. Regards, Seifeddine.
