Completes the generic module platform that enables modules to contribute
UI elements, runtime JS components, and search resources without any
core hardcoding.
New generic UI slot types:
- topbar.right_item: module-contributed topbar buttons
- layout.body_end_template: module-contributed dialog/overlay templates
- layout.head_style: module-contributed global CSS
- runtime.component: declarative JS component registration with phase ordering
New infrastructure:
- ModuleAutoloader: PSR-4 autoloading for module-local PHP classes
- ModuleRuntimePageBuilder: symlinks module pages into runtime directory
- ModuleRuntimeAssetPublisher: publishes module CSS/JS to web/modules/
- ModulePermissionSynchronizer: syncs module permissions to DB
- CLI scripts: module-runtime-sync, module-build, module-migrate,
module-permissions-sync, module-assets-sync
- {{userId}} placeholder in SearchDataService for user-scoped search queries
- Component runtime with phased initialization (early/default/late)
- AppContainer.protectExistingBindings() to prevent module→core overwrites
- Architecture tests: ModuleStructureContractTest, CoreTemplateIsolationTest,
FrontendComponentRuntimeContractTest, AppContainerIsolationContractTest
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.1 KiB
2.1 KiB
Extension-Readiness (Module-System V1.1)
Letzte Aktualisierung: 2026-03-18
Ziel
Verbindliche Vorbedingungen fuer weitere eigenstaendige Module auf dem bestehenden Modul-System festhalten.
Kanonische Quelle
Normativer Manifest- und Runtime-Contract: /docs/reference-module-manifest-contract.md.
Diese Readiness-Doku ist bewusst kurz und verweist fuer Felddefinitionen/Guards immer auf den Manifest-Contract.
Readiness-Checkliste vor Modul 2+
- Modulgrenzen klarziehen
- Betroffene Schichten benoennen (
pages -> Service -> Repository). - Keine Modul-spezifischen Hardcodings im Core-Layout/Core-Routing.
- Betroffene Schichten benoennen (
- Manifest-Contract einhalten
module.phpvalidiert gegen den kanonischen Contract (permissions,scheduler_jobs,ui_slots,routes).- Route-/Slot-/Layout-Guards laufen fail-fast.
- Security + Scope absichern
- AuthZ/RBAC serverseitig pruefen.
- Tenant-Scope serverseitig pruefen.
- POST-Mutationen mit CSRF absichern.
- Runtime-Hygiene absichern
php bin/module-runtime-sync.phplaeuft reproduzierbar mit standardisierter Step-Summary.- Keine First-party CLI-Warnings/Notices/Deprecations; Vendor-Rauschen wird nur gezaehlt/reportet.
- Testbarkeit und Gates
- Architektur- und Domain-Tests fuer neue Logik ergaenzen.
phpunitundphpstanals Pflicht-Gates gruen.
- Daten- und Betriebsfaehigkeit
- Schema-/Datenaenderungen fuer Bestandsinstallationen idempotent in
db/updates/*.sql. - Logs/Audit ohne unredacted PII/Secrets.
- Schema-/Datenaenderungen fuer Bestandsinstallationen idempotent in
Derzeit Out of Scope
- Eigener DB-Server oder Netzwerk-Microservice je Modul.
- Externe Drittanbieter-Module mit Legacy-Kompatibilitaet.
Verfuegbare Core-Services fuer Module
JS-seitig:
- Confirm-Dialog (
confirmDialog) - Async-Flash (
showAsyncFlash) - DOM-Utilities (
app-dom.js) - CSRF-Metadaten über
data-csrf-key/data-csrf-token
PHP-seitig:
- Guard (
MintyPHP\\Support\\Guard) - SessionStore (
MintyPHP\\Http\\SessionStoreInterface) - Flash (
MintyPHP\\Support\\Flash) - DI-Container (
MintyPHP\\App\\AppContainer) - Modul-Contracts (
LayoutContextProvider,SessionProvider,SearchResourceProvider)