dead-code-detector
dead-code-detector copied to clipboard
PHP unused code detection via PHPStan extension.
It should not complain about the constructor.
I'm looking at the [SymfonyEntrypointProvider](https://github.com/shipmonk-rnd/dead-code-detector/blob/master/src/Provider/SymfonyEntrypointProvider.php) and see that it relies on the ServiceMapFactory from phpstan-symfony. This ServiceMapFactory uses the containerXmlPath to function. In our Symfony project, we have this XML...
First of all, thanks for creating this great extension 💙 Since there is not a Discussion board to ask questions, I create this as issue. I have the following code:...
Let's say you have the following: ```php class MyHandler { public function __construct(private SomeDependency $dep) {} public function __invoke(MyCommand $command) {} } class MyCommand { public function __construct(public string $name)...
Currently, the extension is unaware of usage in templates (like Twig). I'm working on [TwigStan](https://github.com/twigstan/twigstan). TwigStan is a separate tool that invokes PHPStan (it's not an extension). It compiles Twig...
I recently worked on a rule to detect unused interfaces, abstract classes and traits from the source code, highly inspired from your plugin (using collectors). In case you might be...
This MR uses our tests against logic in `TomasVotruba/unused-public` and changes the test files [to display the diff of the behaviour](https://github.com/shipmonk-rnd/dead-code-detector/pull/53/files). Assuming our tests are correct then `unused-public` reports: -...
Symfony's property accessor component automatically calls `getProperty`/`setProperty` in forms, how do we ensure these methods are not marked as dead.