mailerlite / laravel-elasticsearch

An easy way to use the official Elastic Search client in your Laravel applications.
MIT License
909 stars 187 forks source link

Undefined index: api_id (Make sure you update the config/elasticsearch.php) too! #142

Closed alinmiron closed 1 year ago

alinmiron commented 1 year ago

Ran a composer update on a Laravel 8 setup and got the error

` Undefined index: api_id

at vendor/cviebrock/laravel-elasticsearch/src/Factory.php:184 180▕ } 181▕ } 182▕ 183▕ // Build and return the client ➜ 184▕ if ($host['api_id'] !== null && $host['api_key'] !== null) { 185▕ $clientBuilder->setApiKey($host['api_id'], $host['api_key']); 186▕ } 187▕ 188▕ return $clientBuilder->build();

  +24 vendor frames 

25 artisan:37 Illuminate\Foundation\Console\Kernel::handle() Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 ` LATER EDIT:

I had an old config/elasticsearch.php file. Overwritten with latest version in this repo and everything is working fine!

cviebrock commented 1 year ago

Deleted 9.0.3. 9.0.4 should fix this. Sorry.