Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DoctrineAdapter OpenIDAuthorizationCodeInterface issue #16

Open
schrotteh opened this issue Jul 5, 2023 · 1 comment
Open

DoctrineAdapter OpenIDAuthorizationCodeInterface issue #16

schrotteh opened this issue Jul 5, 2023 · 1 comment

Comments

@schrotteh
Copy link

Hey there,
I'm working with "api-skeletons/oauth2-doctrine" version 5.1.0 in my project which requires "laminas-api-tools/api-tools-oauth2": "^1.4" which requires "bshaffer/oauth2-server-php": "^1.12.1".

The DoctrineAdapter implements the "OAuth2\OpenID\Storage\AuthorizationCodeInterface as OpenIDAuthorizationCodeInterface".

After my last composer update I discovered the following issue:
The recent change in "OAuth2\OpenID\Storage\AuthorizationCodeInterface" leads to an error because the "setAuthorizationCode" function in the DoctrineAdapter is not compatible with this AuthorizationCodeInterface anymore:

Declaration of ApiSkeletons\OAuth2\Doctrine\Adapter\DoctrineAdapter::setAuthorizationCode($code, $client_id, $user_id, $redirect_uri, $expires, $scope = null, $id_token = null) must be compatible with OAuth2\OpenID\Storage\AuthorizationCodeInterface::setAuthorizationCode($code, $client_id, $user_id, $redirect_uri, $expires, $scope = null, $id_token = null, $code_challenge = null, $code_challenge_method = null)

These changes were made 3 weeks ago in version 1.14.0: https://github.com/bshaffer/oauth2-server-php/blob/v1.14.0/src/OAuth2/OpenID/Storage/AuthorizationCodeInterface.php

@davidwindell
Copy link

davidwindell commented Nov 27, 2023

Annoying that the breaking change was made in a minor release. Anyway, temporary workaround until fixed in this repo is to downgrade bshaffer/oauth2-server-php to 1.13.0 as 1.14.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants