2026-03-04 15:56:58 +01:00
|
|
|
# Erste Änderung (Backend)
|
|
|
|
|
|
2026-03-06 12:25:18 +01:00
|
|
|
Letzte Aktualisierung: 2026-03-06
|
2026-03-04 15:56:58 +01:00
|
|
|
|
|
|
|
|
## Ziel
|
|
|
|
|
|
|
|
|
|
Eine kleine Backend-Änderung korrekt über Repository und Service umsetzen.
|
|
|
|
|
|
|
|
|
|
## Standardablauf
|
|
|
|
|
|
|
|
|
|
1. SQL/Leselogik im Repository erweitern.
|
|
|
|
|
2. Business-Regel im Service ergänzen.
|
|
|
|
|
3. Action anpassen und Response stabil halten.
|
|
|
|
|
4. Bei API-Änderungen OpenAPI aktualisieren.
|
|
|
|
|
|
|
|
|
|
## Regeln
|
|
|
|
|
|
|
|
|
|
- Repository kennt keine HTTP-/Session-Logik.
|
|
|
|
|
- Service kennt keine Superglobals/Redirects.
|
|
|
|
|
- Externe API bleibt UUID-first.
|
|
|
|
|
- Service-Auflösung in `pages/**` via `app(Foo::class)`.
|
|
|
|
|
- Keine direkten `new ...Factory()` in `lib/Service/**` außerhalb `*Factory.php`.
|
|
|
|
|
|
|
|
|
|
## Checks
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
docker compose exec php vendor/bin/phpunit
|
|
|
|
|
docker compose exec php vendor/bin/phpstan analyse -c phpstan.neon --no-progress
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Vertiefung
|
|
|
|
|
|
2026-03-06 12:25:18 +01:00
|
|
|
- `lib/**`-Regeln: `/docs/reference-lib-standards.md`
|
|
|
|
|
- API-Prozess: `/docs/tutorial-08-api-erweitern.md`
|