PHP 8.1.8
Composer version 2.3.10 2022-07-13 15:48:23
Ubuntu 22.04 LTS
執(zhí)行
composer require psr/container ^1.1.1 illuminate/redis symfony/cache
Using version ^9.20 for illuminate/redis
Using version ^6.1 for symfony/cache
./composer.json has been updated
Running composer update psr/container illuminate/redis symfony/cache
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires illuminate/redis ^9.20 -> satisfiable by illuminate/redis[v9.20.0].
- illuminate/redis v9.20.0 requires illuminate/collections ^9.0 -> found illuminate/collections[v9.0.0, ..., v9.20.0] but the package is fixed to v8.83.19 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require illuminate/redis:*" to figure out if any version is installable, or "composer require illuminate/redis:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
感覺是和默認的
"illuminate/database": "^8.83"
對應的插件沖突了
按照提示使用了-W
參數(shù)還是相同的報錯,我的composer.json的配置文件內容如下
{
"name": "workerman/webman",
"type": "project",
"keywords": [
"high performance",
"http service"
],
"homepage": "http://m.wtbis.cn",
"license": "MIT",
"description": "High performance HTTP Service Framework.",
"authors": [
{
"name": "walkor",
"email": "walkor@workerman.net",
"homepage": "http://m.wtbis.cn",
"role": "Developer"
}
],
"support": {
"email": "walkor@workerman.net",
"issues": "https://github.com/walkor/webman/issues",
"forum": "http://wenda.workerman.net/",
"wiki": "http://workerman.net/doc/webman",
"source": "https://github.com/walkor/webman"
},
"require": {
"php": ">=7.2",
"workerman/webman-framework": "^1.3.14",
"monolog/monolog": "^2.0",
"psr/container": "^1.1.1",
"illuminate/database": "^8.83",
"illuminate/pagination": "^8.83",
"illuminate/events": "^8.83",
"symfony/var-dumper": "^5.4",
"vlucas/phpdotenv": "^5.4",
"mouyong/validate": "^2.0"
},
"suggest": {
"ext-event": "For better performance. "
},
"autoload": {
"psr-4": {
"": "./",
"App\\": "./app"
},
"files": [
"./support/helpers.php"
]
},
"scripts": {
"post-package-install": [
"support\\Plugin::install"
],
"post-package-update": [
"support\\Plugin::install"
],
"pre-package-uninstall": [
"support\\Plugin::uninstall"
]
}
}