-
Notifications
You must be signed in to change notification settings - Fork 33
Update meilisearch/meilisearch-php requirement from ^0.11 to ^0.12 #7
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
Update meilisearch/meilisearch-php requirement from ^0.11 to ^0.12 #7
Conversation
Updates the requirements on meilisearch/meilisearch-php to permit the latest version. Signed-off-by: dependabot-preview[bot] <[email protected]>
9140e19
to
f828ca9
Compare
This issue #9 needs to be closed before merging this PR. |
@@ -21,7 +21,7 @@ | |||
|
|||
<service id="search.client" class="MeiliSearch\Client" public="true" lazy="true"> | |||
<argument key="$url">%env(MEILISEARCH_URL)%</argument> | |||
<argument key="$api_key">%env(MEILISEARCH_API_KEY)%</argument> | |||
<argument key="$apiKey">%env(MEILISEARCH_API_KEY)%</argument> |
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'm worried... Why does this line fix the test? @emulienfou
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.
@curquiza Because in the package meilisearch-php
the constructor argument has been rename from snake_case to camelCase since version 0.12.0
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 did not realize that: for me the apiKey
value was only internal... I did not know that the user can access it this way! Good to know!
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.
So, in php, changing a variable name in the parameter for a method is breaking? Or only for constructors? @emulienfou
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.
@curquiza a constructor is public
instead if you make it protected or private.
In Symfony I created a new service
who create a new instance of MeiliSearch/Client
and passing some parameters like the apiKey
.
The code need to know the parameter's name to do that
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.
@emulienfou for me, you call the constructor this way:
$client = new Client('http://127.0.0.1:7700', 'masterKey');
No matter what the name of the parameters. I did not realize you can call the constructor the way you did in PHP! That's why I ask if you can do the same with a "basic" method, not a constructor.
Thanks a lot! I learn more and more in PHP 🙂
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.
@curquiza This is more related to Symfony than PHP itself.
You can find more information about Symfony Services right here: https://symfony.com/doc/current/service_container.html#manually-wiring-arguments
Updates the requirements on meilisearch/meilisearch-php to permit the latest version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.
You can always request more updates by clicking
Bump now
in your Dependabot dashboard.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and language@dependabot badge me
will comment on this PR with code to add a "Dependabot enabled" badge to your readmeAdditionally, you can set the following in your Dependabot dashboard: