refactor(cli)!: hard-cut legacy scripts and standardize console runtime

- remove legacy bin/module-*.php and bin/doctor.php entry scripts

- move module/doctor execution into class-based runners under lib/Console

- add stable JSON output for doctor and module:sync

- introduce bin/dev for init/up/down/logs/console/qa workflow

- update DI wiring, phpstan scan config, tests, and docs to new CLI contract
This commit is contained in:
2026-04-01 17:14:20 +02:00
parent 0bf7f62fd8
commit 7121732fcf
38 changed files with 1686 additions and 986 deletions

View File

@@ -63,8 +63,8 @@ Der `ModuleAutoloader` registriert daraus den absoluten Pfad `modules/<id>/i18n/
```
- `key` und `description` sind Pflichtfelder.
- Runtime-Sync erfolgt ueber `php bin/module-permissions-sync.php`.
- `module-runtime-sync` fuehrt diesen Sync automatisch aus.
- Runtime-Sync erfolgt ueber `php bin/console module:sync`.
- `module:sync` fuehrt diesen Sync automatisch aus.
## `scheduler_jobs` Contract
@@ -120,9 +120,9 @@ Abgrenzung CSS:
`web/index.php` validiert bei jedem Request, dass der Runtime-Stand zur aktuellen Modul-Konfiguration passt.
- `bin/module-build.php` schreibt nach jedem Build `storage/runtime/.module-fingerprint` (sortierte Modul-IDs, kommasepariert).
- `php bin/console module:build` schreibt nach jedem Build `storage/runtime/.module-fingerprint` (sortierte Modul-IDs, kommasepariert).
- `web/index.php` vergleicht den Fingerprint mit der erwarteten Modul-Liste.
- Bei Mismatch: `RuntimeException` mit Hinweis auf `php bin/module-runtime-sync.php`.
- Bei Mismatch: `RuntimeException` mit Hinweis auf `php bin/console module:sync`.
- Kein Auto-Build im Request-Pfad — Build ist ausschliesslich CLI-Aufgabe.
Methoden: `ModuleRuntimePageBuilder::expectedFingerprint()`, `readFingerprint()`, `writeFingerprint()`.
@@ -138,12 +138,12 @@ API-Requests (`api/`-Prefix) ueberspringen den gesamten Web-Session-Flow:
## Standard-Runbook
`php bin/module-runtime-sync.php` fuehrt in fester Reihenfolge aus:
`php bin/console module:sync` fuehrt in fester Reihenfolge aus:
1. `module-migrate`
2. `module-permissions-sync`
3. `module-build`
4. `module-assets-sync`
1. `module:migrate`
2. `module:permissions-sync`
3. `module:build`
4. `module:assets-sync`
Der Output enthaelt eine deterministische Step-Summary (`migrate`, `permissions-sync`, `build`, `assets-sync`) inklusive `vendor_warnings_ignored=<n>`.
First-party Warnings/Notices/Deprecations gelten als Fehler (fail-fast).