Skip to content

Commit 0916432

Browse files
committed
Use hyphenated config names
1 parent 8a83230 commit 0916432

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ php artisan vendor:publish --provider="DirectoryTree\OpenSearchScoutDriver\OpenS
3636

3737
## Configuration
3838

39-
Configure the OpenSearch client connection in `config/opensearch.client.php`:
39+
Configure the OpenSearch client connection in `config/opensearch-client.php`:
4040

4141
```php
4242
'default' => env('OPENSEARCH_CONNECTION', 'default'),
@@ -50,7 +50,7 @@ Configure the OpenSearch client connection in `config/opensearch.client.php`:
5050
],
5151
```
5252

53-
The Scout driver configuration is published to `config/opensearch.scout.php`:
53+
The Scout driver configuration is published to `config/opensearch-scout.php`:
5454

5555
```php
5656
'refresh_documents' => env('OPENSEARCH_SCOUT_REFRESH_DOCUMENTS', false),

src/Engine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct(
3535
protected IndexManager $indexManager,
3636
protected bool $refreshDocuments = false,
3737
) {
38-
$this->refreshDocuments = (bool) config('opensearch.scout.refresh_documents', $refreshDocuments);
38+
$this->refreshDocuments = (bool) config('opensearch-scout.refresh_documents', $refreshDocuments);
3939
}
4040

4141
/**

src/OpenSearchScoutServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class OpenSearchScoutServiceProvider extends ServiceProvider
2424
*/
2525
public function register(): void
2626
{
27-
$this->mergeConfigFrom(__DIR__.'/../config/opensearch.scout.php', 'opensearch.scout');
27+
$this->mergeConfigFrom(__DIR__.'/../config/opensearch-scout.php', 'opensearch-scout');
2828

2929
$this->app->bindIf(ModelFactoryInterface::class, ModelFactory::class);
3030
$this->app->bindIf(DocumentFactoryInterface::class, DocumentFactory::class);
@@ -45,7 +45,7 @@ public function register(): void
4545
public function boot(): void
4646
{
4747
$this->publishes([
48-
__DIR__.'/../config/opensearch.scout.php' => config_path('opensearch.scout.php'),
48+
__DIR__.'/../config/opensearch-scout.php' => config_path('opensearch-scout.php'),
4949
]);
5050

5151
$this->app->make(EngineManager::class)->extend('opensearch', function ($app) {

tests/TestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ protected function getPackageProviders($app): array
2727
protected function defineEnvironment($app): void
2828
{
2929
$app['config']->set('scout.driver', 'opensearch');
30-
$app['config']->set('opensearch.scout.refresh_documents', true);
31-
$app['config']->set('opensearch.client.default', 'default');
32-
$app['config']->set('opensearch.client.connections.default', [
30+
$app['config']->set('opensearch-scout.refresh_documents', true);
31+
$app['config']->set('opensearch-client.default', 'default');
32+
$app['config']->set('opensearch-client.connections.default', [
3333
'base_uri' => env('OPENSEARCH_HOST', 'http://127.0.0.1:9200'),
3434
]);
3535
}

0 commit comments

Comments
 (0)