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

Config in Lumen #48

Open
coolycow opened this issue Jun 14, 2021 · 1 comment
Open

Config in Lumen #48

coolycow opened this issue Jun 14, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@coolycow
Copy link

The package does not use custom settings.

One line is missing in file ElasticsearchServiceProvider.php to use the settings.

protected function configure(): void
{
    $this->mergeConfigFrom(__DIR__ . '/../config/es.php', 'es');
    $this->publishes([
        __DIR__ . '/../config/' => config_path(),
    ], 'es.config');

    // Auto configuration with lumen framework.
    if (
        method_exists($this->app, 'configure') &&
        Str::contains($this->app->version(), 'Lumen')
    ) {
        $this->app->configure("es"); // Add this line.
        $this->app->configure(ConnectionResolverInterface::class);
    }
}
@Radiergummi
Copy link
Member

Hi @coolycow, es should be an alias for ConnectionResolverInterface::class.

Anyway, I'll look into it!

@Radiergummi Radiergummi added the bug Something isn't working label Jun 16, 2021
@Radiergummi Radiergummi self-assigned this Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants