Repository navigation
fix(core): compatibility with Twig 3.28 (backport: 6.7.12.x) - #18053
Merged
Florian Ruppel (fruppel) merged 1 commit intoJul 7, 2026
Merged
Florian Ruppel (fruppel) merged 1 commit into
Florian Ruppel (fruppel) merged 1 commit into
Conversation
shopware-octo-sts-app
Bot
requested a review
from Nicolas Fortier (nfortier-shopware)
July 6, 2026 10:56
Contributor
|
OpenAPI Snapshotℹ️ shopware/store-api — schema identical to base 6.7.12.xℹ️ shopware/admin-api — schema identical to base 6.7.12.x |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 6.7.12.x #18053 +/- ##
=========================================
Coverage 64.99% 64.99%
=========================================
Files 5019 5019
Lines 182396 182396
Branches 9908 9908
=========================================
+ Hits 118549 118552 +3
+ Misses 60932 60929 -3
Partials 2915 2915
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Michael Telgmann (mitelg)
approved these changes
Jul 6, 2026
Nicolas Fortier (nfortier-shopware)
approved these changes
Jul 6, 2026
Florian Ruppel (fruppel)
deleted the
fix/twig-3-28-compatibility-backport-6.7.12.x
branch
July 7, 2026 05:45
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.
Backport: #18027
Resolves: #18028
1. Why is this change necessary?
Twig 3.28.0 was released on 2026-07-03 and CI installs it fresh, so every PR pipeline is red since then.
CoreExtension::include()now returnsTwig\Markupinstead ofstring, and syntax error messages gained a column suffix.The other Twig 3.28 changes were audited:
getAttribute()only changed internals, the newTokenParserInterface::isAlwaysAllowedInSandbox()is inherited fromAbstractTokenParserby all custom token parsers, andEmptyNodereturned bysw_extends/sw_usestill passes the new root node validationThe ATS update 6.7.11 initially could not pass, as all 3 conditions met: old released code with the typed wrapper, no conflicts protection yet, and sw_include sitting directly on the admin login render path.
✅ Update: the ATS update 6.7.11 job passes now. The conflicts protection is live: shopware/conflicts#36 (
twig/twig >=3.28) is merged and served through the new GitHub Pages composer repository (Packagist versions are immutable, so the pinned0.6.1could not be updated there), with the repository entry rolled out via shopware/production#189, web-installer#24 and shopware-cli#1160. The old 6.7.11.1 instance therefore resolves twig 3.27.1 again and its admin login renders. #18029 adds the same repository entry to this repo's root composer.json.2. What does this change do, exactly?
sw_includereturn type tostring|Markup. This is a production fix: rendering any non-empty template throughsw_includethrows aTypeErrorunder Twig 3.28.StringTemplateRendererTestto accept the optionalcolumn Nsuffix.Both changes stay compatible with the full
^3.26.0constraint range.3. Describe each step to reproduce the issue or behaviour.
Update
twig/twigto 3.28.0 and run the unit suite.Without this change the two tests above fail (TypeError and regex mismatch).
With it the full unit suite (16,444 tests) and the Twig adapter integration tests (64 tests) pass under 3.28.
4. Please link to the relevant issues (if any).
5. Checklist
RELEASE_INFO-6.<major>.mdunder “Upcoming” for informational changes, including the consequences of the change and how it affects external developers.UPGRADEsection inUPGRADE-6.<next-major>.mdfor breaking changes (what/why/impact/how to adapt).