dongxu2398 2018-07-19 06:44
浏览 228
已采纳

Composer.lock与生产服务器上实际安装的软件包版本不兼容

I'm working on a project based on PHP7 and Laravel. Unfortunately, there was a problem with dependencies and package versions.

I guessed that the previous developer working on the project started updating packages by calling

composer update 

on his local dev environment.

Therefore, a new composer.lock file has been generated and everything has been pushed to the production server - however, the composer update command has not been called on the production...

There is a problem with the incompatibility of the PHP version and other errors in dependencies.

This is a very large project and I wouldn't like to migrate now to higher versions on the production server.

I am currently preparing a development environment and I care about maintaining the maximum compatibility of all package versions with what is on production.

By calling:

composer install

on local environment, I'm receiving a series of errors related to the incompatibility of the package versions.

Is there any way to regenerate / restore composer.json and composer.lock based on what is currently installed on the production server? Unfortunately, at this moment composer.lock on production doesn't completely reflect the current state of actually installed versions.

What is a safe and good way to recreate locally a cloned project from a repository on a production server - and maintain full compatibility of all package versions, the correct form of composer.json and composer.lock?

Thanks in advance for your help!

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 关于用matlab进行光束整形的问题
      • ¥15 vs code编译器 C语言刚学,想的有点复杂
      • ¥15 航班订票系统函数无法运行
      • ¥20 VS2022无法启动程序,如何解决?(语言-c++|开发工具-visual studio)
      • ¥15 c语言可以做出完整的吗有人看看吗
      • ¥15 电脑流氓插件处理方法
      • ¥15 问一下这个可调恒流源电路用哪个电源接口比较好,想用tapec接口仅作为电源接口这个引脚怎么连啊
      • ¥30 Abaqus做建模的时候网格没办法收敛是为什么?
      • ¥15 车牌识别摄像镜头,httppost,nodejs
      • ¥20 腾讯云托管与本地测试 GET请求获取返回值 完全不同