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

Compatibility on interfaces #1413

Open
JoMo1970 opened this issue Jun 5, 2024 · 2 comments
Open

Compatibility on interfaces #1413

JoMo1970 opened this issue Jun 5, 2024 · 2 comments

Comments

@JoMo1970
Copy link

JoMo1970 commented Jun 5, 2024

Hello,

I am trying to use this framework but I am consistently hitting the below issue:

Fatal error: Declaration of OAuth2ServerExamples\Repositories\ClientRepository::getClientEntity(string $clientIdentifier): ?League\OAuth2\Server\Entities\ClientEntityInterface must be compatible with League\OAuth2\Server\Repositories\ClientRepositoryInterface::getClientEntity($clientIdentifier)

I cannot seem to get passed this problem. It happens when the AuthorizationServer object initializes and I try the /authorize flow. I might have a configuration wrong but I am not sure. Anybody have any ideas? Thanks in advance.

@eugene-borovov
Copy link
Contributor

Hello, @JoMo1970.

This is a PHP issue. Make your implementation fully compatible with an interface. I suggest to set up type hints in method declaration.

@JoMo1970
Copy link
Author

JoMo1970 commented Jun 6, 2024

Understood. Appreciate the feedback.

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