如何從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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章