Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.57 KB

File metadata and controls

44 lines (33 loc) · 1.57 KB

Testing & Code Quality

Tests

mise run test            # full suite
mise run test -f Login   # filter by name
mise run test --coverage # HTML coverage report in var/coverage

Tests use a separate _test-suffixed database (see Database → Test database). The suite covers:

  • Unit tests — User entity logic
  • Functional tests — registration, login, dashboard access, JWT authentication

Static analysis & style

Tool Config Command
php-cs-fixer (@Symfony ruleset) .php-cs-fixer.dist.php mise lint (--fix to apply)
PHPStan level 8 (Symfony + Doctrine extensions, no baseline) phpstan.dist.neon mise analyse
Rector (PHP 8.5 + composer-based Symfony/Doctrine sets) rector.php mise rector (--fix to apply)

Run everything (style check + analysis + rector dry-run + tests) concurrently:

mise quality

The same scripts are exposed through Composer: composer quality, composer analyse, composer format / format:test, composer rector / rector:fix, composer test.

Notes

  • The PHPStan Symfony/Doctrine extensions boot the kernel via tests/console-application.php and tests/object-manager.php, and read the compiled container XML from var/cache/dev/ — the analyse task warms the cache first automatically.
  • Rector's RemoveEraseCredentialsRector is intentionally skipped in rector.php (it mangles the class body); review any Rector dry-run diff before applying --fix.
  • There is no PHPStan baseline — keep it that way; fix findings instead.