Symfony 6.1 -安装“hwi/oauth-bundle”会抛出“无法将您的要求解析为一组可安装的软件包”,

uinbv5nw  于 2022-11-16  发布在  其他
关注(0)|答案(1)|浏览(86)

我在PHP 8.1 / Symfony 6.1项目中运行以下命令:

compose require hwi/oauth-bundle

出现以下错误:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - hwi/oauth-bundle[1.4.0, ..., 1.4.5] require symfony/framework-bundle ^4.4|^5.1 -> found symfony/framework-bundle[v4.4.0, ..., v4.4.46, v5.1.0, ..., v5.4.13] but it conflicts with your root composer.json require (6.1.5).
    - Root composer.json requires hwi/oauth-bundle ^1.4 -> satisfiable by hwi/oauth-bundle[1.4.0, ..., 1.4.5].

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 hwi/oauth-bundle:*" to figure out if any version is installable, or "composer require hwi/oauth-bundle:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
tyu7yeag

tyu7yeag1#

根据发行版hwi/HWIOAuthBundle#1880,Symfony 6还没有官方支持。
Symfony 6支持将添加到捆绑包的2.x版本中。
v2.x正式发布之前,您可以使用以下命令安装hwi/oauth-bundle2.x测试版和Symfony 6.x

compose require hwi/oauth-bundle:2.0.x-dev

您可以使用Symfony CLI在临时目录中快速验证它:

symfony new --version=6.1 /tmp/symfony-6.1
cd /tmp/symfony-6.1
composer require template
composer require hwi/oauth-bundle:2.0.x-dev
rm -rf /tmp/symfony-6.1

安装良好。

相关问题