In the investigation of #2982 I found out that the Diagnostic Provider requires the MemberAcessContext in the creation of this class we also resolve the type of the member, however for this class we don't need the type. Would it be smart to use lazy objects in this case? So that we don't have to run logic when we don't need the type?
However this is a php8.4 feature: https://www.php.net/manual/en/language.oop5.lazy-objects.php
In the investigation of #2982 I found out that the Diagnostic Provider requires the MemberAcessContext in the creation of this class we also resolve the type of the member, however for this class we don't need the type. Would it be smart to use lazy objects in this case? So that we don't have to run logic when we don't need the type?
However this is a php8.4 feature: https://www.php.net/manual/en/language.oop5.lazy-objects.php