Skip to content
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

SW-659 Add separate route for export debug information #253

Closed

Conversation

zaifastafa
Copy link
Contributor

No description provided.

@zaifastafa zaifastafa changed the title Push state SW-659_separate_route_for_export_debug_informatio Mar 1, 2022
@zaifastafa zaifastafa changed the title SW-659_separate_route_for_export_debug_informatio SW-659_separate_route_for_export_debug_information Mar 1, 2022
@TobiasGraml11 TobiasGraml11 self-assigned this Mar 25, 2022
@TobiasGraml11 TobiasGraml11 changed the title SW-659_separate_route_for_export_debug_information SW-659 Add separate route for export debug information Mar 25, 2022
Comment on lines +177 to +178
$mainProduct = clone $result->first();
$children = $mainProduct->getChildren();
Copy link
Contributor

@TobiasGraml11 TobiasGraml11 Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not using a cloned instance of the product lead to the children being recursively added. So it was possible to do this:
$result->first()->getChildren()->last()->getChildren()->last()->getChildren()->last()->getChildren()->last()

Issue came up, because the JsonResponse class complained about recursion during JSON parsing:
image

Before:

  • Requested Variant
    • Sibling 1
    • Sibling 2
    • Main Variant
      • Sibling 1 / Child 1
      • Sibling 2 / Child 2
      • Main variant
        • .... (and so on)

Now:

  • Requested Variant
    • Sibling 1
    • Sibling 2
    • Main Variant
      • Sibling 1 / Child 1
      • Sibling 2 / Child 2

src/Export/ProductDebugService.php Outdated Show resolved Hide resolved
src/Export/ProductDebugService.php Outdated Show resolved Hide resolved
src/Resources/config/services/services.xml Show resolved Hide resolved
src/Validators/DebugExportConfiguration.php Show resolved Hide resolved
src/Export/ProductDebugService.php Outdated Show resolved Hide resolved
src/Export/ProductDebugService.php Outdated Show resolved Hide resolved
src/Export/ProductDebugService.php Outdated Show resolved Hide resolved
@TobiasGraml11
Copy link
Contributor

Closing in favor of #285

@TobiasGraml11 TobiasGraml11 deleted the SW-659_separate_route_for_export_debug_information branch May 30, 2022 14:26
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.

None yet

3 participants