Skip to content

Releases: kayw-geek/phpstan-type-trace

Release list

v0.2.0

Choose a tag to compare

@kayw-geek kayw-geek released this 25 May 03:38
093e7d6

Extension attribution (via) expanded

via now covers three PHPStan extension categories, not just one:

Event Extension category Example
assign / assign-op Dynamic return type via NewModelQueryDynamicMethodReturnTypeExtension
narrow Type-specifying (inside if / ternary cond) via AssertTypeSpecifyingExtension
read Properties class reflection (magic / virtual attrs) via MagicPropsExt

Third-party detection is now by source-file location, not namespace — official add-ons like phpstan/phpstan-webmozart-assert that ship under PHPStan\ are correctly attributed; only phpstan/phpstan core is filtered out.

Fixed

  • via was silently dropped from narrow rows in both CLI and PHPStan rule renderers.
  • isThirdParty() over-filtered legitimate add-on extensions due to naive namespace check.

Known gap

Bare-statement specifier calls (e.g. Assert::notNull(\$x); outside any if / ternary) still narrow the scope but emit no narrow event — wrap in an if if you need the attribution.