Repository navigation
Add Contao 6 support and drop Contao 4 - #1
Closed
markocupic wants to merge 1 commit into
Closed
markocupic wants to merge 1 commit into
markocupic wants to merge 1 commit into
Conversation
- Require contao/core-bundle ^5.3 || ^6.0 and PHP ^8.2 - Fix images in cloned rows: the image check looked at the replacement string instead of the options, so addToClone(..., ['type' => 'image']) never inserted an image - Use StringUtil::specialchars()/decodeEntities() to escape the replacement text and move the text handling into prepareText() - Avoid undefined index warnings in addToClone() and drop the return value of the constructor - Load the Markocupic\PhpOffice namespace via PSR-4 instead of a classmap - Fix the example paths in the README and docs/example - Use the MIT license everywhere (composer.json, file headers), matching the LICENSE file - Move the ECS config to tools/ecs, add PHPUnit, CI and tests that generate a document from the example template Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jb7ViNYJwLjr2Y34g8aAoK
markocupic
force-pushed
the
contao-6-support
branch
from
October 10, 2026 11:29
1328c24 to
4e2af07
Compare
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.
Summary
Makes the bundle compatible with Contao 6 while keeping Contao 5.3 support (Contao 4 is dropped). CI runs against Contao 5.3 + phpoffice/phpword 1.0 (PHP 8.2/8.3, incl.
--prefer-lowest) and Contao 6.0 + phpword 1.4 (PHP 8.4/8.5).Changes
contao/core-bundle: ^5.3 || ^6.0, PHP^8.2, directsymfony/filesystemandsymfony/http-kernelrequirementsgenerate()checked$replace['replace']['type'](a string offset of the replacement value) instead of$replace['options']['type'], soaddToClone(…, ['type' => 'image'])never inserted an image. The image path is now also no longer HTML-escaped before the file check.StringUtil::specialchars(StringUtil::decodeEntities())(same result as before,htmlspecialchars(html_entity_decode())); text handling moved intoprepareText()addToClone()without a previouscreateClone()no longer raises an undefined index warning; the constructor no longer returns a valueMarkocupic\PhpOffice\…is autoloaded via PSR-4 instead of a classmap (namespace unchanged)docs/example/…) and linksTooling
.ecs/totools/ecs(contao/easy-coding-standard ^6.13)contao/test-case, CI workflowdocs/example/templates/ms_word_template.docxand check replacements, escaping, bold/multiline formatting, cloned rows and cloned imagesLicense
The bundle is now MIT everywhere:
composer.json(wasLGPL-3.0+) and the file headers incl. the ECS header config (wereGPL-3.0-or-later), matching the existingLICENSEfile.🤖 Generated with Claude Code
https://claude.ai/code/session_01Jb7ViNYJwLjr2Y34g8aAoK
Generated by Claude Code