Next milestone achieved 🍾
Merged into @symfony core.
max_depth was counted per runtime class name. A Doctrine proxy is a subclass of the entity, so it got its own counter, and a graph with max_depth 1 serialized two levels deep instead of one.
The depth key now falls back to the parent class when the parent declares the same MaxDepth. Proxy and entity share one counter.
The issue was opened in October 2024. 685 days in the tracker before someone got to it.
Landed in 6.4 LTS, merged by nicolas-grekas, upmerges to 7.4 and 8.1 next.
https://github.com/symfony/symfony/pull/65647
#Symfony #PHP #Doctrine #Serializer #OpenSource #Backend #Blog #Fediverse #FOSS #Software #Development
Edited 14d ago