On 16/11/2023 20:41, Rowan Tommins wrote:
Hi all,
I have finally written up an RFC I have been considering for some
time: Harmonise "untyped" and "typed" properties
RFC URL: https://wiki.php.net/rfc/mixed_vs_untyped_properties
I've revised the RFC; it now proposes to keep the implicit "= null" for
untyped properties, although I'm still interested in suggestions for
other strategies around that. I have also added discussion of variance
checks (thanks Claude for the tips on that).
While doing so, I checked Reflection, and am unsure how to proceed.
Currently ReflectionParameter shows a difference between "function
foo($bar)" and "function foo(mixed $bar)", even though these are
analysed as equivalent in inheritance checks. Should ReflectionProperty
also retain this distinction? Was the possibility discussed when "mixed"
was introduced of using a ReflectionType of mixed for both cases?
Regards,
--
Rowan Tommins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php