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

Refactor CredentialRepository to interface #415

Closed
wants to merge 4 commits into from

Conversation

alexw23
Copy link

@alexw23 alexw23 commented Dec 18, 2022

I've been trying to include just the service components of this package (excluding routers, controllers etc) however ran into an issue.

Our repository structure is a little different from the default in this package. It can't be overridden as the underlying OptionsFactory doesn't allow for this as it's explicitly typed preventing us from doing so:

/**
* Public Key Credential Source Repository.
*
* @var CredentialRepository
*/
protected CredentialRepository $repository;

And also doesn't the repository if it's not the required type:

if ($repository instanceof CredentialRepository) {
$this->repository = $repository;
}

This PR creates an interface for CredentialRepository and then updates OptionsFactory to use the interface instead.

@alexw23 alexw23 marked this pull request as draft December 19, 2022 04:01
@alexw23 alexw23 marked this pull request as ready for review January 25, 2023 22:14
@alexw23
Copy link
Author

alexw23 commented May 25, 2023

Hi @asbiin any feedback on this?

@asbiin
Copy link
Owner

asbiin commented Jun 20, 2023

Hi @asbiin any feedback on this?

@alexw23 I don't see (yet) how adding the contract might change something, but maybe the PR wasn't finished?

@asbiin
Copy link
Owner

asbiin commented Sep 4, 2023

Superseded by #441

@asbiin asbiin closed this Sep 4, 2023
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

Successfully merging this pull request may close these issues.

2 participants