Releases: shipmonk-rnd/dead-code-detector
Releases · shipmonk-rnd/dead-code-detector
0.13.0
New features:
- Detect dead enum cases (#197); off by default, enable by:
parameters:
shipmonkDeadCode:
detect:
deadEnumCases: true
Fixes
- Fix false positive when
@final
class is inherited (#233) - Fix debug output for overridden built-in methods (#234)
Breaking changes:
ClassMemberRef
is now generic, you may need to update phpdocs of thoseClassConstantRef
constructor now requiresTrinaryLogic $isEnumCase
argument
Dependencies
phpstan/phpstan
now requires^2.1.12
(was^2.1.9
)
0.12.4
0.12.3
0.12.2
0.12.1
0.12.0
0.11.1
0.11.0
New features
- Support unknown member names like
$foo->$unknown()
(#189)- Such call marks all methods of
$foo
as used (including possible descendants, ancestors, traits, ...)
- Such call marks all methods of
- Reflection provider:
- New Twig provider:
- Support
#[AsTwigFilter]
,#[AsTwigFunction]
,#[AsTwigTest]
andnew TwigFilter(..., callback)
counterparts (#194, @zacharylund)
- Support
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
0.10.2
0.10.1
Improvements
- Debug: Changing references not to invalidate result cache (#169)
- Autoremove: warn about kept excluded usages (#175)
• Removed method UserFacade::deadMethod
! Excluded usage at tests/User/UserFacadeTest.php:241 left intact
- Improve descendant detection for const fetches (#176)
Dependencies
phpstan/phpstan
now requires^2.1.9
(was^2.1.7
) (#169)