Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Google Package #296

Open
AmyStephen opened this issue Dec 2, 2013 · 1 comment
Open

Google Package #296

AmyStephen opened this issue Dec 2, 2013 · 1 comment

Comments

@AmyStephen
Copy link
Contributor

In the Google Class Constructor, the OAuth2 Class is instantiated (if not injected).

It appears the second parameter, that being "the client", is missing from the injected constructor parameters.

From Google Class:

$this->auth  = isset($auth) ? $auth : new Auth\OAuth2($this->options);

From OAuth2 Class

  public function __construct(Registry $options, Client $client)

Is this a problem? If so, I'd be happy to fix it but would appreciate a hint about what the client should be and how to construct that class.

Thanks!

@dongilbert
Copy link
Contributor

Good catch, it is a bug, for sure. The Client is a Joomla\OAuth2\Client. It's constructor can be found here: https://github.com/joomla/joomla-framework/blob/staging/src/Joomla/OAuth2/Client.php#L56

I think the better solution would be to mandate passing in a properly configured Auth\OAuth2 instance, as there is a lot of configuration needed for a OAuth2\Client to be instantiated. I don't see this as a BC break, as it doesn't even work currently, since Client is non-optional, and we aren't passing it in.

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

No branches or pull requests

2 participants