-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
OAuth2ServerFactory is not returning instance of OAuth2\Server #14
Comments
My code editor also doesn't agree on a closure being returned by Deep down in the ZF2
In the
That is why I get the following error comment: I also get an error here
Since the php doc is not correct it looks like we are instantiating I think it would be better to return the Originally posted by @Wilt at zfcampus/zf-oauth2#114 (comment) |
@Wilt PR ? :) Originally posted by @jguittard at zfcampus/zf-oauth2#114 (comment) |
@jguittard I was awaiting response from someone working on this repository to get some feedback on how to improve this... @weierophinney Do you have time to take a quick look and make a suggestion on how to deal with this in a PR? IMHO it would be good if this essential part of the zf-mvc-auth module becomes a bit more readable/understandable... All these Originally posted by @Wilt at zfcampus/zf-oauth2#114 (comment) |
@Wilt This was done due to issues with the design of oauth2-server. Essentially, the We can maybe solve the IDE issues with typehints, and some of these may be solved now (I did some work on the Originally posted by @weierophinney at zfcampus/zf-oauth2#114 (comment) |
@weierophinney Thanks for the explanation. Would it be possible to use a lazy services pattern (using delegators) for this instead of this invokable factory? Or is this not sufficient to solve those issues you refer to? Originally posted by @Wilt at zfcampus/zf-oauth2#114 (comment) |
The
ZF\OAuth2\Factory\OAuth2ServerFactory
is no longer returning aOAuth2\Server
instance?https://github.com/zfcampus/zf-oauth2/blob/master/src/Factory/OAuth2ServerFactory.php
The file has been changed in the latest version and it returns a closure (Factory!?) now. My code is broken since I simply used
$serviceLocator->get('ZF\OAuth2\Service\OAuth2Server');
elsewhere to get theOAuth2\Server
instance from the server manager.The documentation has also not been updated accordingly and is no longer up to date since it still states it will give me an
OAuth\Server
.Is returning another factory from a factory really the way to go? How should I now get my oauth server instance? Is it maybe possible to separate the keys so getting the server is still possible?
Originally posted by @Wilt at zfcampus/zf-oauth2#114
The text was updated successfully, but these errors were encountered: