8000 bug #27365 [Serializer] Check the value of enable_max_depth if define… · symfony/symfony@cb106fa · GitHub
[go: up one dir, main page]

Skip to content

Commit cb106fa

Browse files
bug #27365 [Serializer] Check the value of enable_max_depth if defined (dunglas)
This PR was merged into the 3.4 branch. Discussion ---------- [Serializer] Check the value of enable_max_depth if defined | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | n/a Because it confuses some users that `['enable_max_depth' => false]` actually triggers the check. Commits ------- e88e0f3 [Serializer] Check the value of enable_max_depth if defined
2 parents f8e21fd + e88e0f3 commit cb106fa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ private function isMaxDepthReached(array $attributesMetadata, $class, $attribute
331331
{
332332
if (
333333
!isset($context[static::ENABLE_MAX_DEPTH]) ||
334+
!$context[static::ENABLE_MAX_DEPTH] ||
334335
!isset($attributesMetadata[$attribute]) ||
335336
null === $maxDepth = $attributesMetadata[$attribute]->getMaxDepth()
336337
) {

0 commit comments

Comments
 (0)
0