How to remove unused dependencies from composer?

后端 未结 4 452
我在风中等你
我在风中等你 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:46

    Just run composer install - it will make your vendor directory reflect dependencies in composer.lock file.

    In other words - it will delete any vendor which is missing in composer.lock.

    Please update the composer itself before running this.

提交回复
热议问题