【发布时间】:2021-07-24 10:03:57
【问题描述】:
我正在使用 Windows 操作系统来运行 PHP Laravel-8 应用程序。我的 Windows 本地系统中所有项目的 PHP 版本是 PHP-Version3.8。我本地系统中的所有 Laravel 项目都有 ("php": "^7.3|^8.0",)
但是,我从团队项目中提出了拉取请求,但它是 PHP-Version4。该项目还使用 Laravel-8 框架 ("php": "^7.4|^8.0",)
当我尝试在下载的项目上运行 composer install 时,我收到了这个错误:
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- Root composer.json requires php ^7.4|^8.0 but your PHP version (7.3.8) does not satisfy that requirement.
Problem 2
- lcobucci/clock is locked to version 2.0.0 and an update of this package was not requested.
- lcobucci/clock 2.0.0 requires php ^7.4 || ^8.0 -> your php version (7.3.8) does not satisfy that requirement.
Problem 3
- lcobucci/jwt is locked to version 4.0.3 and an update of this package was not requested.
- lcobucci/jwt 4.0.3 requires php ^7.4 || ^8.0 -> your php version (7.3.8) does not satisfy that requirement.
Problem 4
- lcobucci/jwt 4.0.3 requires php ^7.4 || ^8.0 -> your php version (7.3.8) does not satisfy that requirement.
- league/oauth2-server 8.2.4 requires lcobucci/jwt ^3.4 || ^4.0 -> satisfiable by lcobucci/jwt[4.0.3].
- league/oauth2-server is locked to version 8.2.4 and an update of this package was not requested.
然后当我更新作曲家时,错误是这样的:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires php ^7.4|^8.0 but your php version (7.3.8) does not satisfy that requirement.
所有项目都在使用 composer-2
如果我将本地系统升级到 PHPV-7.4,我会遇到部署项目的问题。
我该如何解决这个问题?
谢谢
【问题讨论】: