如何从composer中删除未使用的依赖项? - How to remove unused dependencies from composer?

问题:

I installed a package with composer, and it installed many other packages as dependencies. 我安装了一个包含composer的包,并且它安装了许多其他包作为依赖项。

Now I uninstalled the main package with composer remove packageauthor/packagename , but all the old dependencies were not removed. 现在我使用composer remove packageauthor/packagename卸载了主包,但是没有删除所有旧的依赖项。 I expected composer to clean up and only keep packages that are required according to composer.json and their dependencies. 我希望composer能够清理并只保留根据composer.json及其依赖项所需的包。

How can I force composer to clean up and remove all unused packages ? 如何强制编写器清理并删除所有未使用的包?


解决方案:

参考一: https://en.stackoom.com/question/1ozw0
参考二: https://stackoom.com/question/1ozw0
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章