The LB build strips MAIN-only domains (Domain/User, Domain/Device, Domain/Auth), so DomainDatabaseWiring::wire() fataled with 'class not found' on load-balancer nodes (EnigmaService, then EPG, ...). Iterate a flat list of domain services and guard each setDb() call with class_exists(), so classes absent from a given build are skipped instead of crashing boot.
Apply 'make cs-fix' — 493 files. Mechanical, import-block only:
- sort use statements alphabetically (class/function/const grouped);
- drop imports left unused by the PSR-4 migration (e.g. classes referenced by
leading-backslash FQCN whose redundant 'use' the automated insertion had added);
- one blank line after namespace and after the import block; collapse stray
blank lines around use.
No logic changes. Verified: php -l clean; PHPStan no errors; PHPUnit 295/295; and a
temporary PHPStan pass over src/Public/Controllers confirms no still-referenced
import was removed (0 unresolved classes). 'use' after inline HTML in view
templates is valid and aliases correctly (verified) — those imports are sorted too.