Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cb106fa

Browse filesBrowse 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
Copy full SHA for cb106fa

File tree

1 file changed

+1
-0
lines changed
Filter options

1 file changed

+1
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
+1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.