donglun1918 2019-04-19 07:09
浏览 36

如何在没有发现问题的情况下复制供应商文件夹

I am using composer for my project and the entire project (even the vendor folder) is under git version control.
I know it may seem like a false action but I am in bandwidth deficit and I want to lower my bandwidth usage so I use this method to just copy the vendor folder.
When I push to to another repository and try to run php main.php from there It says that can not find the classes that I am using there.

I have managed to solve this problem by removing the whole vendor folder and re running composer i but it is not the behavior that I want. I want low bandwidth usage, I want to not wait for package installation.

I am using the same method for virtualenv of python apps and there is the same problem but that problem can be solved by just running virtualenv venv/ again so it corrects the new paths for the copied environment. How can I achieve the same behavior with composer? I dont see any info or command that can help me doing this.

Thanks in advance folks :)

  • 写回答

1条回答 默认 最新

  • dqrqp8492 2019-04-19 08:48
    关注

    Found the solution.
    All you need to do is to remove one file and one folder:

    rm -rf vendor/composer;
    rm vendor/autoload.php;
    

    Then run composer i and it will recreate the removed composer folder again and corrects the autoload files.

    Have a nice day.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?