- Issue created by @SocialNicheGuru
- First commit to issue fork.
I'm also seeing WSOD with the same error after updating from beta8 to beta9. When clearing cache via
drush cr
I see a different error:PHP Fatal error: Declaration of Drupal\simple_oauth\Repositories\ScopeRepository::finalizeScopes(array $scopes, string $grantType, League\OAuth2\Server\Entities\ClientEntityInterface $clientEntity, ?string $userIdentifier = null, ?string $authCodeId = null): array must be compatible with League\OAuth2\Server\Repositories\ScopeRepositoryInterface::finalizeScopes(array $scopes, $grantType, League\OAuth2\Server\Entities\ClientEntityInterface $clientEntity, $userIdentifier = null) in /app/web/modules/contrib/simple_oauth/src/Repositories/ScopeRepository.php on line 57
Updating just the module doesn't trigger this error, but updating with the following dependencies does:
- Upgrading lcobucci/jwt (5.4.2 => 5.5.0) - Upgrading league/oauth2-server (8.5.4 => 8.5.5) - Upgrading league/uri (7.4.1 => 7.5.1) - Upgrading league/uri-interfaces (7.4.1 => 7.5.0) - Upgrading steverhoades/oauth2-openid-connect-server (v2.6.1 => v3.0.1)
Site is running core 10.4.3, and I haven't applied the patch mentioned in the issue summary.
- π³π±Netherlands bojan_dev
You need to update simple_oauth with dependencies, thephpleague/oauth2-server needs to be 9.2, for more info see: π± Move to thephpleague/oauth2-server 9.0 Active and https://git.drupalcode.org/project/simple_oauth/-/jobs/4456948.
- πΊπΈUnited States SocialNicheGuru
@bojan_dev, league/oauth2-server was removed as a requirement in [##3277256:]:
- "league/oauth2-server": "^8.5 || ^9.0",
- "steverhoades/oauth2-openid-connect-server": "^2.6",
+ "steverhoades/oauth2-openid-connect-server": "^3.0", - πΊπΈUnited States SocialNicheGuru
So i added "league/oauth2-server": "^9.2" to my composer file and it did work.
So was taking it out a regression?
I did have to do some work to accommodate which I am including if it will help others:
I also had to add this to my composer.json: "lcobucci/jwt":"5.5 as 4.0" to accommodate the change as a few modules (commerce_authnet and indieweb use lcobucci/jwt":^4.0" - π³π±Netherlands bojan_dev
I wonder if we really need that dependency specified, because it's already a dependency in: steverhoades/oauth2-openid-connect-server, see: https://github.com/steverhoades/oauth2-openid-connect-server/blob/v3.0.1....
composer update drupal/simple_oauth -W
should do the trick or am I missing something? - πΊπΈUnited States SocialNicheGuru
As per, https://github.com/steverhoades/oauth2-openid-connect-server/blob/v3.0.1..., there might be cases like mine where ^8.4 was being installed but I needed 9.2 and above.
I had to explicitly call ^9.2 to ensure that got enabled
- Merge request !175Issue #3508777: Add league/oauth2-server requirement β (Merged) created by bojan_dev
- π³π±Netherlands idebr
Yes, we should be explicit about ^9.0 of league/oauth2-server due to PHP compatibility of method signatures
-
bojan_dev β
committed 61e5eb86 on 6.0.x
Issue #3508777: Add league/oauth2-server requirement
-
bojan_dev β
committed 61e5eb86 on 6.0.x
- π¦πΊAustralia skyejohnson Sunshine Coast, Australia
Sorry for MR174, I misunderstood that this was a composer issue.
- π³π±Netherlands bojan_dev
@skyejohnson I made a new release for this composer fix
6.0.0-beta10
, so you should be able to do a regular update (without patching),"drupal/simple_oauth": "^6.0"
should be set as requirement in your project composer.json. Automatically closed - issue fixed for 2 weeks with no activity.