-
Notifications
You must be signed in to change notification settings - Fork 33
Allow to use services for settings #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5ad205c
to
a1a24be
Compare
Can you generate an issue based on this comment @norkunas? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @norkunas, sorry for the massive delay in reviewing your PR.
I'm suggesting a change to include an interface instead of using the invocation directly. I think it would be more idiomatic + easier to detect errors and evolve the code.
e1b5b02
to
e284b5f
Compare
e284b5f
to
ff8f082
Compare
@@ -9,6 +9,7 @@ | |||
use Meilisearch\Bundle\Exception\TaskException; | |||
use Meilisearch\Bundle\Model\Aggregator; | |||
use Meilisearch\Bundle\SearchService; | |||
use Meilisearch\Bundle\SettingsProvider; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any requirement to have the Interface
suffix?
SettingsProviderInterface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SearchService is also an interface, so avoided
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could have the Interface suffix on both. But it could be done later I'll create a new issue to make this repo PSR complaint https://www.php-fig.org/psr/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
This message is sent automatically Thank you very much for submitting your PR! Did you know that throughout the month of June we’re holding a rafle? |
Pull Request
Related issue
Fixes #248
What does this PR do?
PR checklist
Please check if your PR fulfills the following requirements:
Opened a a POC so we can discuss if this is the way to go :)
Things to notice:
CommandsTest
someday into multiple test files and use different config files, as now when you add a separate config for test most of tests output must also be updated.Meilisearch\Exceptions\ApiException: Json deserialize error: invalid type: map, expected a sequence at line 1 column 0
and how should I know which config setting is related? So imho we should properly validate all the settings for a better DX.