Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the initialization of lazy-ghost proxies with postLoad listeners #11544

Open
wants to merge 1 commit into
base: 2.19.x
Choose a base branch
from

Conversation

stof
Copy link
Member

@stof stof commented Jul 5, 2024

PostLoad listeners might initialize values for transient properties, so the proxy should not skip initialization when using transient properties.

Closes #11524

PostLoad listeners might initialize values for transient properties, so
the proxy should not skip initialization when using transient
properties.
@stof stof added the Bug label Jul 5, 2024
@stof
Copy link
Member Author

stof commented Jul 30, 2024

the failing tests are because the testsuite currently relies on unmapped public properties to track the usage of postLoad listeners.
For doctrine/common proxies, public properties were unsupported and were not triggering initialization (public methods were the trigger, and using a public property was allowing to skip using any method), which was a known limitation of the proxy system (meant to be solved by the new system, among other things)
For the initial implementation of the lazy-ghost proxies, mapped properties were the trigger, making those tests work as well (as those are unmapped properties). But as this PR is precisely about changing the trigger to be all properties, tests will need a different way to track usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant