Jan Nedbal

Results 179 comments of Jan Nedbal

This is [now documented](https://github.com/shipmonk-rnd/dead-code-detector?tab=readme-ov-file#constructors) as expected. Maybe I'll try to come with more advanced solution later.

But there is **no `ext-amqp` symbol usage in src**, right? You just use `symfony/amqp-messenger` which has its own require of `ext-amqp`. Thus you dont rely on `ext-amqp` directly. In theory,...

Any plans here? We just got hit by that 3 years old bug (#1040), but it is still not resolved.

Sorry about late response. This idea opens quite a big topic we already discussed multiple times internally: Basically, composer-dependency-analyser could be generalized to any-dependency-analyser while reusing its internal logic. The...

I believe that in order to support this (and https://github.com/shipmonk-rnd/dead-code-detector/issues/83), we need some `HiddenCallProvider` which will be based on AST, not based on reflection like EntrypointProvider is.

[Since 0.7.0](https://github.com/shipmonk-rnd/dead-code-detector/releases/tag/0.7.0), we can deduce usages from AST, but I'm still unsure if it can solve this problem. Because when we are analysing `$this->commandBus->dispatch`, we would need to know which...

First of all, please keep in mind we still work only with class methods, not classes itself. So if `MyCommand::__construct` [in you example](https://github.com/shipmonk-rnd/dead-code-detector/issues/91#issuecomment-2706658936) is not reported as unused, it means...

But otherwise yes, we could probably emit usage of MyHandler::handle with origin in MyCommand::__construct based on the attribute.

> We should try to work on detecting unused classes. Yeah, I already tried POCing that, it will take some time.

Some API ideas: ```php # exclude (possibly specific) attributes in general $config->excludeAttributeUsages([\JetBrains\PhpStorm\Deprecated::class]) # ignore errors in when emitted from attribute usage (misses package) $config->ignoreErrorsInAttribute([\JetBrains\PhpStorm\Deprecated::class], [ErrorType::DEV_DEPENDENCY_IN_PROD]) # introduce IgnoredError builder +...