Home > OS >  Symfony 6.1 - Installation of "hwi/oauth-bundle" throws "Your requirements could not
Symfony 6.1 - Installation of "hwi/oauth-bundle" throws "Your requirements could not

Time:10-06

I run the following command in a PHP 8.1 / Symfony 6.1 project:

compose require hwi/oauth-bundle

I get the following error:

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.

CodePudding user response:

According to issue hwi/HWIOAuthBundle#1880 there is no official support for Symfony 6 (yet).

Symfony 6 support will be added in version 2.x of the bundle.

Until there is an official v2.x release release you can use the following command to install the 2.x beta versions of hwi/oauth-bundle with Symfony 6.x.

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

You can verify it quickly in a temporay directory with the 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

Installs fine.

  • Related