-
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
Merged
emulienfou
merged 3 commits into
master
from
dependabot/composer/meilisearch/meilisearch-php-tw-0.12
Jul 9, 2020
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
f828ca9
Update meilisearch/meilisearch-php requirement from ^0.11 to ^0.12
dependabot-preview[bot] 1e84890
Fixing argument name passed to `MeiliSearch\Client` class since using…
david-simplyphp 18fa952
Merge branch 'master' into dependabot/composer/meilisearch/meilisearc…
emulienfou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 version0.12.0
Uh oh!
There was an error while loading. Please reload this page.
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!Uh oh!
There was an error while loading. Please reload this page.
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 ofMeiliSearch/Client
and passing some parameters like theapiKey
.The code need to know the parameter's name to do that
Uh oh!
There was an error while loading. Please reload this page.
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:
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