Files
xamxam/TODO.md
Pontoporeia 0a05f3911c Replace Psalm with PHPStan + PHP‑CS‑Fixer + Biome, add linting configs & cleanup
- Removed the `vimeo/psalm` dependency and all related files
(`psalm.xml`, `psalm‑baseline.xml`, suppress annotations).  
- Added **PHPStan** (v2.1.54) and **PHP‑CS‑Fixer** (v3.95.1) to
`vendor/bin/`.  
- Created `phpstan.neon` (level 5, bootstraps `app/bootstrap.php`,
scans `Parsedown.php`).  
- Created `phpstan‑baseline.neon` with 10 pre‑existing errors.  
- Added `.php‑cs‑fixer.dist.php` (PSR‑12 + PHP80Migration, targets
 `app/src` & `app/tests`).  
- Added `biome.json` and updated `justfile` to replace the old Psalm
recipes with `phpstan`, `cs‑check`, and `cs‑fix`.  
- Updated `.gitignore` to exclude PHPStan and PHP‑CS‑Fixer cache files.  
- Updated several JS files (`file‑preview.js`, `file‑upload‑queue.js`)
eand PHP controllers (`MediaController.php`, `SearchController.php`,
`SystemController.php`).  
- Minor adjustments to `TODO.md`, `app/src/Database.php`,
`app/src/Parsedown.php`, `app/src/ShareLink.php`, and
`app/src/SmtpRelay.php`.
2026-05-05 11:04:52 +02:00

1.7 KiB

TODO

  • Refactor justfile to reduce redundancy and merge similar recipes
    • Merge deploy-* recipes into a single deploy-script recipe
    • Remove rarely used recipes (show id, setup-dirs)
    • Simplify test-* recipes
    • Remove redundant default recipe
    • Preserve all critical functionality
  • Enhance serve recipe to automatically open the browser
  • Keep serve recipe in the foreground (browser open backgrounded, PHP server blocks)
  • Add psalm recipe (auto-inits config on first run, then analyses)
  • Fix all genuine Psalm errors (InvalidOperand, UnusedVariable, InvalidReturnType, NullableReturnStatement, InvalidArrayOffset, UnusedForeachValue, RedundantFunctionCall)
  • Generate psalm-baseline.xml to suppress false positives (UndefinedConstant, PossiblyUnused*, UnusedClass)
  • Add lint-biome recipe; fix all JS errors and warnings (arrow functions, template literals, noRedundantUseStrict, noUnusedVariables, useIterableCallbackReturn)
  • Replace Psalm with PHPStan + PHP-CS-Fixer
    • Remove vimeo/psalm and all its deps from vendor/
    • Install phpstan.phar (2.1.54) and php-cs-fixer.phar (3.95.1) in vendor/bin/
    • Create phpstan.neon (level 5, bootstraps app/bootstrap.php, scanFiles Parsedown)
    • Generate phpstan-baseline.neon (10 pre-existing errors baselined)
    • Create .php-cs-fixer.dist.php (PSR-12 + PHP80Migration, targets app/src + app/tests)
    • Replace psalm justfile recipe with phpstan, cs-check, cs-fix
    • Remove psalm.xml, psalm-baseline.xml
    • Remove @psalm-suppress annotations from SmtpRelay.php and RateLimit.php
    • Add .phpstan.result.cache and .php-cs-fixer.cache to .gitignore