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

Closed
opened 2026-01-22 16:17:08 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/12059

State: closed
Merged: No


(Continuation of #9545)

This is a proposed extension point to help solve https://github.com/doctrine/DoctrineBundle/issues/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 9a4e91b783).

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

**Original Pull Request:** https://github.com/doctrine/orm/pull/12059 **State:** closed **Merged:** No --- _(Continuation of #9545)_ This is a proposed extension point to help solve https://github.com/doctrine/DoctrineBundle/issues/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](https://user-images.githubusercontent.com/127811/155747034-dfd7c399-3016-49ef-a270-939132cffd91.png) 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 https://github.com/kbond/symfony-reproducer/commit/9a4e91b783bbc653457d6d22410068e00b679eed). I don't think this causes any performance problems for hydration (when using the `DefaultHydratorFactory`).
admin added the pull-request label 2026-01-22 16:17:08 +01:00
admin closed this issue 2026-01-22 16:17:08 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#13446