Skip to content

fix: reduce PHPStan baseline errors by 42%#814

Closed
Spomky wants to merge 0 commit into5.3.xfrom
fix/reduce-phpstan-baseline-v2
Closed

fix: reduce PHPStan baseline errors by 42%#814
Spomky wants to merge 0 commit into5.3.xfrom
fix/reduce-phpstan-baseline-v2

Conversation

@Spomky
Copy link
Copy Markdown
Contributor

@Spomky Spomky commented Mar 8, 2026

Summary

  • Add precise array{} shape type annotations to Symfony DI extension and security factory methods, eliminating ~65 baseline entries
  • Fix type mismatches in AuthenticationExtensions (remove incompatible @readonly, fix offsetGet return type)
  • Fix PublicKeyCredentialRequestOptions phpdoc typo (AuthenticationExtensionsAuthenticationExtension)
  • Add typed return phpdoc to TPMAttestationStatementSupport::checkCertInfo() and extract getRsaParameters() method
  • Remove redundant type checks in options factories (is_int, is_string on already-typed values)
  • Fix realpath() return handling in WebauthnBundle

Reduces PHPStan baseline from 154 to 90 entries (-42%) while keeping all 275 tests passing.

Test plan

  • castor phpunit — all 275 tests pass
  • castor phpstan — passes with updated baseline
  • CI pipeline validates all checks

🤖 Generated with Claude Code

@Spomky Spomky closed this Mar 10, 2026
@Spomky Spomky force-pushed the fix/reduce-phpstan-baseline-v2 branch from 8ea51c7 to 2ef95e6 Compare March 10, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant