New features
- Support unknown member names like
$foo->$unknown()
(#189)
- Such call marks all methods of
$foo
as used (including possible descendants, ancestors, traits, ...)
- Reflection provider:
- Usages like
ReflectionClass->getMethods()
now mark alive also methods of descendants (#189)
- Support calls over unbounded
ReflectionClass<object>
(#193)
- e.g.
$anyObjectReflection->getMethod('foo')
marks all foo
methods of all types as alive
- Can be disabled with
usageOverMixed
excluder
- New Twig provider:
- Support
#[AsTwigFilter]
, #[AsTwigFunction]
, #[AsTwigTest]
and new TwigFilter(..., callback)
counterparts (#194, @zacharylund)
Fixes:
- Fix origin file reference for traits (#190)
- Report dead method line at its name (#192)
- Fix mixed calls diagnostics when custom excluder is used (#196)
Breaking changes:
- Inline ignores of method with attribute need to move (#192):
- #[Deprecated] // @phpstan-ignore shipmonk.deadMethod
- public function someMethod(): void
+ #[Deprecated]
+ public function someMethod(): void // @phpstan-ignore shipmonk.deadMethod