Sti3bas / laravel-scout-array-driver

Array driver for Laravel Scout
MIT License
89 stars 8 forks source link

Not working if queue is configured #23

Open Artem-Schander opened 1 month ago

Artem-Schander commented 1 month ago

Thank you for the package. Its nice to have a possibility to test the index. However, it took me a white to find the reason it wont work in my case. I configured scout to use a specific queue. Not just a boolean value.

'queue' => [
    'connection' => env('SCOUT_QUEUE_CONNECTION', 'redis'),
    'queue' => env('SCOUT_QUEUE_NAME', 'indexing'),
],

Considering the setting must be something like 'queue' => env('SCOUT_QUEUE', false) there is no nice way to use env vars to change it for testing. Besides that, it would be worth mentioning in the readme that the queue setting can cause issues.

Artem-Schander commented 1 month ago

for my scenario this phpunit.xml env entries do the trick:

<env name="SCOUT_QUEUE_CONNECTION" value="null"/>
<env name="SCOUT_QUEUE_NAME" value="null"/>

Maybe it would make sense to make this package ignore the queue config all together?

Feel free to close this issue without any comment.