trikoder / oauth2-bundle

Symfony bundle which provides OAuth 2.0 authorization/resource server capabilities.
https://www.trikoder.net/
MIT License
249 stars 114 forks source link

Cannot install on the latest symfony version (v5.0.*) #147

Closed robquinn closed 4 years ago

robquinn commented 4 years ago

I have attempted to install this package numerous times on both symfony (v5.0.*) starter boilerplates: On "symfony/skeleton"

composer create-project symfony/skeleton .

And on "symfony/website-skeleton"

composer create-project symfony/website-skelton .

The install of "trikoder/oauth2-bundle" fails on both of these symfony (v5.0.*) starters when trying to install with the method described in the documentation:

composer require trikoder/oauth2-bundle nyholm/psr7

In both cases this error is produced:

➜  symfony4 composer require trikoder/oauth2-bundle nyholm/psr7

Using version ^2.1 for trikoder/oauth2-bundle
Using version ^1.2 for nyholm/psr7
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.0.*"
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for trikoder/oauth2-bundle ^2.1 -> satisfiable by trikoder/oauth2-bundle[v2.1.0].
    - trikoder/oauth2-bundle v2.1.0 requires symfony/framework-bundle ^3.4|^4.2 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

The issue seems to be the symfony version, as described in the error: " trikoder/oauth2-bundle v2.1.0 requires symfony/framework-bundle ^3.4|^4.2 -> no matching package found."

Will this package not function on the latest symfony version? Do I have to use symfony 4.2 or 3.4 as detailed in the documentation? If so, is there something I can modify/re-code within the package itself in order to make it compliant with the latest symfony version? I would be more than willing, even excited, to contribute if that is the case. I have been studying the package in order to reverse engineer it and resolve this issue, just haven't been successful yet.

Nevertheless, any and all feedback is welcome. Otherwise, I hope you have a wonderful day :)

robquinn commented 4 years ago

@robitwtms I'm not sure if this is the fix you are looking for, but as the error suggests, you have to either change you minimum stability requirements or add a composer stability flag to "trikoder/oauth2-bundle" in order for the install to proceed:

{
  require: {
    "trikoder/oauth2-bundle": "2.*@dev"
  }
}

Hope this helps you. cheers.

robquinn commented 4 years ago

Thanks @robitwtms ! Im not sure yet if everything will work as intended if I lower minimum stability, but I'm going to just add a stability flag to the package and see how far it gets me. Thank you so much! :) Have a good one and thanks again!