馃 task: #3592170 Upgrade to PHPStan 2.3.0 and phpstan-phpunit 2.1.0, and fix the new errors

Upgrades phpstan/phpstan to 2.3.0 and phpstan/phpstan-phpunit to 2.1.0. Fixes 10 of the 12 new errors. The other 2 are PHPStan 2.3.0 false positives, ignored inline with a @todo.

AI-Generated: Yes (Used Claude Code to compare PHPStan 2.2.16 and 2.3.0 results, sort real errors from false positives, and write the change).

Testing instructions

  • lint (php) passes
  • Kernel and functional tests pass

Closes #3592170

Merge request reports

Loading
Loading