如何从作曲家中删除未使用的依赖关系? [英] How to remove unused dependencies from composer?
问题描述
现在我用卸载主软件包composer remove packageauthor / packagename
,但所有旧的依赖关系未删除。我期望作曲家清理,只保留根据 composer.json
及其依赖关系所需的软件包。
如何强制编辑器清理并删除所有未使用的软件包?
正确的方法是:
composer remove jenssegers / mongodb --update-with-dependencies
我必须承认这里的标志不清楚它会做什么。
更新
自 v1.0.0-beta2 起 - -update-with-dependencies
是默认值,不再需要。
I installed a package with composer, and it installed many other packages as dependencies.
Now I uninstalled the main package with composer remove packageauthor/packagename
, but all the old dependencies were not removed. I expected composer to clean up and only keep packages that are required according to composer.json
and their dependencies.
How can I force composer to clean up and remove all unused packages ?
The right way to do this is:
composer remove jenssegers/mongodb --update-with-dependencies
I must admit the flag here is not quite obvious as to what it will do.
Update
As of v1.0.0-beta2 --update-with-dependencies
is the default and is no longer required.
这篇关于如何从作曲家中删除未使用的依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!