[英]Should dependencies be deleted from disk automatically after install/update with Composer?
After removing a dependency from composer.json and running install or update, should I expect the files to be removed automatically from disk? 从composer.json中删除依赖项并运行安装或更新后,我是否应该从磁盘中自动删除文件?
I had to remove them manually, not sure if I am supposed to. 我不得不手动删除它们,不确定我是否应该这样做。
Running a composer update will remove packages you removed from your composer.json. 运行编辑器更新将删除您从composer.json中删除的包。
Since install uses composer.lock instead of composer.json it will not remove packages removed from your composer.json . 由于install使用composer.lock而不是composer.json ,因此不会删除从composer.json中删除的包。 However, you should get a message that your lock file is out of sync with your composer.json and you should run an update.
但是,您应该收到一条消息,指出您的锁定文件与composer.json不同步,您应该运行更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.