From fdc53ed1d8b9da52cf2ae5afbd486c8cc66b24fa Mon Sep 17 00:00:00 2001 From: zingimmick Date: Mon, 4 Mar 2024 13:30:56 +0800 Subject: [PATCH] Add custom password for OpenSearch 2.12 and later --- .github/workflows/tests.yml | 1 + rector.php | 2 +- tests/Fixtures/SearchableModel.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4d00a7c..3ab9989 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,6 +19,7 @@ jobs: env: discovery.type: single-node plugins.security.disabled: 'true' + OPENSEARCH_INITIAL_ADMIN_PASSWORD: ${{ secrets.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} runs-on: ubuntu-latest strategy: diff --git a/rector.php b/rector.php index d99c9f9..2ab5c8b 100644 --- a/rector.php +++ b/rector.php @@ -10,7 +10,7 @@ use Rector\Set\ValueObject\LevelSetList; use Zing\CodingStandard\Set\RectorSetList; -return static function (Rector\Config\RectorConfig $rectorConfig): void { +return static function (\Rector\Config\RectorConfig $rectorConfig): void { $rectorConfig->sets([LevelSetList::UP_TO_PHP_80, PHPUnitSetList::PHPUNIT_CODE_QUALITY, RectorSetList::CUSTOM]); $rectorConfig->phpstanConfig(__DIR__ . '/phpstan.neon'); $rectorConfig->bootstrapFiles([__DIR__ . '/vendor/nunomaduro/larastan/bootstrap.php']); diff --git a/tests/Fixtures/SearchableModel.php b/tests/Fixtures/SearchableModel.php index 2176819..58f9744 100644 --- a/tests/Fixtures/SearchableModel.php +++ b/tests/Fixtures/SearchableModel.php @@ -21,7 +21,7 @@ public function searchableAs(): string /** * @return array */ - public function scoutMetadata() + public function scoutMetadata(): array { return []; }