feat!: replace DB-based templates/modules with native PHP classes#6487
Draft
feat!: replace DB-based templates/modules with native PHP classes#6487
Conversation
Templates, modules, and actions are no longer managed via the backend UI. They will be defined as PHP classes in the project and addon code instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Templates and modules are no longer stored as PHP code text in the database but as native PHP classes with attributes (#[AsTemplate], #[AsModule]). Classes are discovered automatically via ClassDiscovery. - Remove DB tables rex_template, rex_module, rex_action, rex_module_action - rex_article.template and rex_article_slice.module reference by string key - Template/module classes contain logic directly (render, input, output) - Lifecycle hooks (onPreview, onPresave, onPostsave) in module instead of separate actions - Remove backend management pages for templates/modules/actions - ContentSection as value object for template content areas - Locale-aware sorting via Collator
This was
linked to
issues
Apr 13, 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.
Zusammenfassung
Templates, Module und Actions werden nicht mehr als PHP-Code-Text in der Datenbank gespeichert, sondern sind native PHP-Klassen. Die Klassen werden über
ClassDiscoveryautomatisch erkannt — es ist keine manuelle Registrierung nötig.Die Backend-Verwaltungsseiten für Templates, Module und Actions entfallen komplett.
Was entfällt
rex_template,rex_module,rex_action,rex_module_actionWas sich ändert
rex_article.templateundrex_article_slice.modulereferenzieren nun per String-Key statt Integer-IDonPreview,onPresave,onPostsave)Beispiele
Template definieren
Modul definieren
Lookup