algolia / scout-extended

Scout Extended: The Full Power of Algolia in Laravel
https://www.algolia.com/doc/framework-integration/laravel/getting-started/introduction-to-scout-extended/
MIT License
395 stars 85 forks source link

Add LocalSettingsRepositoryContract #272

Closed sebastiandedeyne closed 3 years ago

sebastiandedeyne commented 3 years ago
Q A
Bug fix? no
New feature? no
BC breaks? no
Related Issue Fix #123
Need Doc update not necessarily

Describe your change

We're working on a multi-tenant app and would like more fine-grained control over how config is stored. Since LocalSettingsRepository is final, we're not able to extend it to modify (see #222 for a previous attempt to make it extendable).

I respect the decision to keep everything final, so instead I propose creating a contract for the LocalSettingsRepository, so package users may bind their own implementation to the IoC.

What problem is this fixing?

Provides more control over local configuration storage, useful when dealing with multiple environments (see #123) or multi-tenant applications.

sebastiandedeyne commented 3 years ago

Tests are failing but I don't think that's related to this PR.

DevinCodes commented 3 years ago

Just released this in v1.15.0, thank you for contributing and happy coding!