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:
@@ -1,6 +1,6 @@
|
||||
# CLI-Kommandoreferenz
|
||||
|
||||
Letzte Aktualisierung: 2026-03-25
|
||||
Letzte Aktualisierung: 2026-04-01
|
||||
|
||||
## Einstiegspunkt
|
||||
|
||||
@@ -36,6 +36,12 @@ Noetig nach jeder Aenderung an Modulen, Manifesten, Routen oder `APP_ENABLED_MOD
|
||||
|
||||
Falls `web/index.php` den Fehler "Module runtime is stale" wirft, ist dieser Befehl die Loesung.
|
||||
|
||||
Maschinenlesbar:
|
||||
|
||||
```bash
|
||||
docker compose exec php php bin/console module:sync --format=json
|
||||
```
|
||||
|
||||
### module:migrate
|
||||
|
||||
Wendet ausstehende SQL-Migrationen aus aktiven Modulen an.
|
||||
@@ -120,6 +126,27 @@ docker compose exec php php bin/console doctor
|
||||
|
||||
Siehe `/docs/howto-betriebscheck-doctor.md` fuer Details.
|
||||
|
||||
Maschinenlesbar:
|
||||
|
||||
```bash
|
||||
docker compose exec php php bin/console doctor --format=json
|
||||
```
|
||||
|
||||
## Developer-Orchestrator (`bin/dev`)
|
||||
|
||||
Fuer lokalen Workflow gibt es zusaetzlich den Dev-Orchestrator:
|
||||
|
||||
```bash
|
||||
bin/dev init
|
||||
bin/dev up
|
||||
bin/dev down
|
||||
bin/dev logs [service]
|
||||
bin/dev console module:sync
|
||||
bin/dev qa
|
||||
```
|
||||
|
||||
`bin/dev console ...` delegiert intern auf `docker compose exec -T php php bin/console ...`.
|
||||
|
||||
## Neue Kommandos anlegen
|
||||
|
||||
1. Klasse in `lib/Console/Commands/` erstellen, die `MintyPHP\Console\Command` erweitert.
|
||||
@@ -156,13 +183,4 @@ Die `Command`-Basisklasse stellt Helfer bereit:
|
||||
|---|---|
|
||||
| `$this->bootstrapApp($channel)` | App-Bootstrap fuer Nicht-Modul-Kommandos |
|
||||
| `$this->bootstrapModuleApp()` | App-Bootstrap mit Modul-Error-Policy und Locking |
|
||||
| `$this->requireBinScript('name.php')` | Laedt ein `bin/`-Script ohne fragile relative Pfade |
|
||||
| `$this->projectRoot()` | Gibt den absoluten Projekt-Root-Pfad zurueck |
|
||||
|
||||
## Legacy-Scripts
|
||||
|
||||
Die alten `bin/*.php`-Scripts funktionieren weiterhin, geben aber einen Hinweis auf `bin/console` aus:
|
||||
|
||||
```
|
||||
Hint: prefer `php bin/console module:sync` instead.
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user