Skip to content

Config in Lumen #48

@coolycow

Description

@coolycow

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);
    }
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions