Conversation
CustomProfilerExtensions replaces the class of the `twig` service with
TwigDecorator. Shopware sets that service's class to
Shopware\Core\Framework\Adapter\Twig\TwigEnvironment, so extending plain
Twig\Environment silently drops Shopware's own Twig behaviour -- `use_yield`,
the CoreExtension and EscaperRuntime overrides in compile(), and ResetInterface.
Since Shopware 6.7.14.0 it also breaks the shop. The new DocumentV2 subsystem
type-hints the concrete TwigEnvironment:
Shopware\Core\Checkout\DocumentV2\Template\DocumentTemplateRenderer::__construct():
Argument FriendsOfShopware#2 ($twig) must be of type
Shopware\Core\Framework\Adapter\Twig\TwigEnvironment,
Frosh\DevelopmentHelper\Component\Profiler\TwigDecorator given
GenerateDocumentAction now receives both DocumentGenerator and
DocumentV2Generator, and FlowExecutor instantiates flow actions eagerly, so the
renderer is constructed on any flow dispatch. A plain POST /api/customer
answers 500 with the plugin installed, which takes down acceptance tests across
the board.
TwigEnvironment extends Twig\Environment, and it exists in both 6.6 and 6.7, so
this stays within the plugin's `~6.6.0 || ~6.7.0` requirement.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
shyim
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CustomProfilerExtensions replaces the class of the
twigservice with TwigDecorator. Shopware sets that service's class to Shopware\Core\Framework\Adapter\Twig\TwigEnvironment, so extending plain Twig\Environment silently drops Shopware's own Twig behaviour --use_yield, the CoreExtension and EscaperRuntime overrides in compile(), and ResetInterface.Since Shopware 6.7.14.0 it also breaks the shop. The new DocumentV2 subsystem type-hints the concrete TwigEnvironment:
GenerateDocumentAction now receives both DocumentGenerator and DocumentV2Generator, and FlowExecutor instantiates flow actions eagerly, so the renderer is constructed on any flow dispatch. A plain POST /api/customer answers 500 with the plugin installed, which takes down acceptance tests across the board.
TwigEnvironment extends Twig\Environment, and it exists in both 6.6 and 6.7, so this stays within the plugin's
~6.6.0 || ~6.7.0requirement.