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

Issue with guzzle configuration #228

Closed
kidager opened this issue Feb 15, 2024 · 0 comments · Fixed by #227
Closed

Issue with guzzle configuration #228

kidager opened this issue Feb 15, 2024 · 0 comments · Fixed by #227

Comments

@kidager
Copy link
Contributor

kidager commented Feb 15, 2024

Issue / Motivation:

When additionalConfigKeys is defined in a provider, the guzzle configuration is dropped.

Expected behavior:

When calling ConfigRetriever::fromServices, ConfigRetriever->additionalConfigKeys should contain the guzzle key if it was defined in the service.

Actual behavior:

When additionalConfigKeys is defined in a provider, the guzzle configuration is dropped.

Steps to reproduce the behavior:

In this example, the guzzle is defined in the service configuration, however, since the provider defines the additionalConfigKeys method, guzzle configuration gets ignored.

  • SampleProvider.php

    // ...
    class SampleProvider extends AbstractProvider
    {
        // ...
        public static function additionalConfigKeys()
        {
            return ['config1', 'config2'];
        }
        // ...
    }
  • Listener

    $socialiteWasCalled->extendSocialite('sample-provider', SampleProvider::class);
  • config/services.php

    'sample-provider' => [
        'client_id' => 'sample-provider-client-id',
        'client_secret' => 'sample-provider-client-secret',
        'redirect' => 'sample-provider-redirect-url',
        'config1' => 'foo',
        'realms' => 'bar',
        'guzzle' => [
            'verify' => false,
        ],
    ],

Proposed solution:

See #227

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