Never apply readonly to Doctrine entities or mapped-superclasses (embeddables: see references/doctrine-modernization-edges.md).
Never run Rector without --dry-run. Invoke vendor/bin/rector directly — composer script aliases can drop ---forwarded flags depending on configuration.
Never raise PHPStan level without regenerating + committing the baseline. Shrink, never delete.
Never apply blanket final to mock targets or extension points without confirmation.
Never edit @generated files or files under var/cache/, vendor/, node_modules/, .Build/.
Never git checkout -- files outside your scope in shared trees — use git stash / git diff.
Never trust a warm PHPStan cache after vendor change: rm -rf /tmp/phpstan-* var/cache/phpstan first.
Never mass-substitute createMock → createStub — promote to expects(...)->method(...)->with(...).
Migration checklist
declare(strict_types=1) everywhere
@PER-CS, no deprecated aliases
PHPStan ≥9 (treatPhpDocTypesAsCertain: false); 10 for new
Copyright (c) Netresearch DTT GmbH — Methodology and best practices (MIT / CC-BY-SA-4.0)
Special thanks to Netresearch DTT GmbH for their generous open-source contributions to the TYPO3 community, which helped shape this skill collection. Adapted by webconsulting.at for this skill collection