Skip to content

[RFC] add HydrationFactory as extension point for tracking hydrations #12059

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

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

Conversation

kbond
Copy link
Contributor

@kbond kbond commented Jul 4, 2025

(Continuation of #9545)

This is a proposed extension point to help solve doctrine/DoctrineBundle#109. I'm thinking a HydratorInterface that AbstractHydrator implements should be added but wanted to get some feedback/input before going further.

The doctrine bundle could use this to add hydration times to the timeline:
Symfony-Profiler

The doctrine bundle could add something similar to https://github.com/debesha/DoctrineProfileExtraBundle#screenshots to the profiler panel.

You can see an example of how this could be used in DoctrineBundle here: https://github.com/kbond/symfony-reproducer/tree/hydration-profiler-poc (specifically kbond/symfony-reproducer@9a4e91b).

I don't think this causes any performance problems for hydration (when using the DefaultHydratorFactory).

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.

1 participant