How to remove unused dependencies from composer?

后端 未结 4 438
我在风中等你
我在风中等你 2020-12-07 07:54

I installed a package with composer, and it installed many other packages as dependencies.

Now I uninstalled the main package with composer remove packageautho

4条回答
  •  时光取名叫无心
    2020-12-07 08:53

    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

    composer remove jenssegers/mongodb
    

    As of v1.0.0-beta2 --update-with-dependencies is the default and is no longer required.

提交回复
热议问题