-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Useless dependencies option #51
Comments
This is problematic due to how composer dependencies work, as sometimes you have to require a dependency, and then a third-party package performs a lookup to see if a certain HTTP client or extension is available, then looks for polyfills and so on. This means that the useless packages would be filled with potentially dangerous false-positives. |
That fact makes it perhaps not useful for automation, but yhere could still be an option to request this check on demand - usually the maintainer is going to be able to tell false positives from real ones, so this check could definitely be useful in my opinion. For example, after a large refactoring, such as splitting off certain members to a separate package - it's often hard to keep track of the dependency changes in that situation. |
@mindplay-dk Well explained what I think about that. This is also why I said the configuration file should accept packages to ignore. |
Duplicate of #14? |
@soullivaneuh Would https://github.com/composer-unused/composer-unused help for your case? |
I'd recommend that tool, too, even though it is only just starting and has some issues, errors and unresolved edge cases. I have them both running in an automated job, so using one or two tools is no big deal. And I can imagine that these two tools have way different approaches due to their different nature. Keeping them separate will probably reduce overall complexity. ;) |
It would be a great addition to be able to list useless dependencies. I mean an required dependency with no symbol usage at all.
Of course, it should be optional and the configuration file should accept packages to ignore.
Some packages could just provide configuration file or whatever not related to PHP directly, but used. This case would be a false positive.
The text was updated successfully, but these errors were encountered: