Skip to content

Add Proxy::__setInitialized() and RuntimeReflectionProperty#307

Merged
derrabus merged 1 commit intodoctrine:3.1.xfrom
nicolas-grekas:proxy-set-init
Oct 9, 2022
Merged

Add Proxy::__setInitialized() and RuntimeReflectionProperty#307
derrabus merged 1 commit intodoctrine:3.1.xfrom
nicolas-grekas:proxy-set-init

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Oct 3, 2022

On the path to deprecate Doctrine\Common\Proxy\Proxy, I figured out that we're going to need adding __setInitialized() to the Proxy interface. This is because we need it in RuntimeReflectionProperty to disable lazy-loading while calling ReflectionProperty::setValue().

The new RuntimeReflectionProperty allows getting+setting any properties on objects while preventing lazy-loading initialization, which is something that's going to be needed also to move to more capable proxy implementations.

RuntimePublicReflectionProperty is not enough and is thus deprecated.

greg0ire
greg0ire previously approved these changes Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants