-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[HttpFoundation] Fix typo for ParameterBag getters #6278
[HttpFoundation] Fix typo for ParameterBag getters #6278
Conversation
[HttpFoundation] Fix typo for max number of arguments for ParameterBag getters
@@ -140,7 +140,7 @@ has some methods to filter the input values: | |||
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::filter` | |||
Filters the parameter by using the PHP :phpfunction:`filter_var` function. | |||
|
|||
All getters takes up to three arguments: the first one is the parameter name | |||
All getters take up to two arguments: the first one is the parameter name |
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.
Well, in Symfony 2.7 you can still pass a third argument to perform a "deep search" (see the following paragraph). However, talking about only two parameters is true when it comes to Symfony 3.0.
Would you be able to make that change here and open another pull request for the 3.0
branch?
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.
Hello, @xabbuh!
Yep, you are right. I only checked against the 3.0 branch.
I will do a pull request against the 3.0 branch asap.
Thanks,
Denis
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.
@rendler-denis Changing "takes" to take" for all other branches indeed is right. So we can merge this one when you change back "two" to "three". :)
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.
@xabbuh, I've reverted the 'two' to 'three' text and also added a description and example for the third argument. The example is based on the comment from the code and I haven't had time to check if it is 100% correct.
Let me know if it needs any further changes.
I will do a PR for the 3.0 branch in a few hours as well.
Thanks,
Denis
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 the addition for the third parameter is not needed (there already is a paragraph below that explains why the argument is there). I also wouldn't want to add more details about a feature of which we know that it is not there anymore in newer Symfony versions.
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 to be honest, I would rather favour to remove the description of that feature than to document it even more (but keeping it the way it is is okay for me too).
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.
@xabbuh, I see your point. I reverted the text to its original state plus removal of the unnecessary 's' character.
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.
- Add missing doc for optional $deep ParameterBag getter - Set correct number of arguments back for versions up to 2.7
Remove the unnecessary description for ParameterBag::get() third argument
…er-denis) This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #6278). Discussion ---------- [HttpFoundation] Fix typo for ParameterBag getters [HttpFoundation] Fix typo for max number of arguments for ParameterBag getters | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.7 | Fixed tickets | ~ Commits ------- 9a06dab [HttpFoundation] Fix typo for ParameterBag getters
Thank you @rendler-denis. I have merged your PR into the |
* 2.3: [#6278] small tweak [HttpFoundation] Fix typo for ParameterBag getters Updated third param true to UrlGeneratorInterface::ABSOLUTE_URl in text Generating Absolute URLs fix yaml syntax [#6255] some tweaks Rewrite EventDispatcher introduction Fixed code example some tweaks to the Doctrine registration article mention routing from the database Conflicts: components/event_dispatcher/introduction.rst
[HttpFoundation] Fix typo for max number of arguments for ParameterBag getters