oauth2-bundle: Error in token controller

Hey I got this error on calling token route:

Cannot autowire argument $serverRequest of "trikoder.oauth2.controller.token_controller:indexAction()": it references interface "Psr\Http\Message\ServerRequestInterface" but no such service exists. Did you create a class that implements this interface?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (5 by maintainers)

Most upvoted comments

Okay so eventually I did the following:

bash$ composer require nyholm/psr7
# changed composer.json manually to use "dev-master " as a value for trikoder/oauth2-bundle and "^1.2" for "symfony/psr-http-message-bridge"
bash$ composer update trikoder/oauth2-bundle symfony/psr-http-message-bridge

Note that it didn’t work to just update trikoder-oauth2-bundle to dev-master.

This fixes my issue. I hope this version gets tagged soon 😉

We are working on this in https://github.com/trikoder/oauth2-bundle/pull/43. The plan is to have it merged by tomorrow.

v2.0.0-beta1 was tagged and 2.0 will be tagged soon too so I’m closing this issue.

I just tried to update trikoder/oauth2-bundle to the dev-master version (with the sensio/framework-extra-bundle at 5.3.1), but that doesn’t want to install

  Problem 1
    - Can only install one of: symfony/psr-http-message-bridge[v1.2.0, v1.0.2].
    - Can only install one of: symfony/psr-http-message-bridge[v1.2.0, v1.0.2].
    - Can only install one of: symfony/psr-http-message-bridge[v1.2.0, v1.0.2].
    - trikoder/oauth2-bundle dev-master requires symfony/psr-http-message-bridge ^1.2 -> satisfiable by symfony/psr-http-message-bridge[v1.2.0].
    - Installation request for trikoder/oauth2-bundle dev-master -> satisfiable by trikoder/oauth2-bundle[dev-master].
    - Installation request for symfony/psr-http-message-bridge (locked at v1.0.2) -> satisfiable by symfony/psr-http-message-bridge[v1.0.2].

Note: I’m using symfony 4.2 (not 4.3)… And I don’t have nyholm/psr7 installed, as it isn’t a requirement for anything as far as I can tell… they even removed it as a requirement in sensio/framework-extra-bundle 5.3.0

@rubenodeman Make sure you have SensioFrameworkExtraBundle enabled in your kernel:

Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true]