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

Final tests and adjustments to allow mapping properties with hooks #11852

Merged
merged 7 commits into from
Apr 12, 2025

Conversation

beberlei
Copy link
Member

@beberlei beberlei commented Feb 27, 2025

Adding support for non-virtual property hooks now that native lazy objects are supported.

Property hooks are not supported when using symfony/var-exporter.

Verified

This commit was signed with the committer’s verified signature.
beberlei Benjamin Eberlei
@beberlei beberlei marked this pull request as draft February 27, 2025 19:57
@faizanakram99
Copy link

symfony/var-exporter added support for hooked properties symfony/symfony#59965

Verified

This commit was signed with the committer’s verified signature.
beberlei Benjamin Eberlei

Verified

This commit was signed with the committer’s verified signature.
beberlei Benjamin Eberlei
Also prevent using property hooks with symfony/var-exporter for now.
They did add support in a recent version, but my tests still failed with
that, so not bothering with that for now.

Verified

This commit was signed with the committer’s verified signature.
beberlei Benjamin Eberlei
return;
}

foreach ($class->propertyAccessors as $propertyAccessor) {
Copy link
Member Author

@beberlei beberlei Mar 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClassMetadataFactory:: validateRuntimeMetadata is called to early, as it does not have access to any accessors yet. However this is in persistence and cannot be changed easily.

Here its available, however at the downside of being called in every request even when loaded from cache.

@beberlei beberlei changed the title PoC Property Hooks support, what is missing still? Final tests and adjustments to allow mapping properties with hooks Mar 29, 2025

Verified

This commit was signed with the committer’s verified signature.
beberlei Benjamin Eberlei
…ooked properties.

Verified

This commit was signed with the committer’s verified signature.
beberlei Benjamin Eberlei
@beberlei beberlei marked this pull request as ready for review March 30, 2025 18:55
greg0ire
greg0ire previously approved these changes Apr 5, 2025
@greg0ire greg0ire requested a review from SenseException April 5, 2025 10:18
SenseException
SenseException previously approved these changes Apr 7, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@greg0ire greg0ire dismissed stale reviews from SenseException and themself via fede50a April 12, 2025 08:58
@greg0ire greg0ire merged commit 443cf92 into doctrine:3.4.x Apr 12, 2025
86 checks passed
@greg0ire
Copy link
Member

Thanks @beberlei !

@greg0ire greg0ire added this to the 3.4.0 milestone Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants