Skip to content
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

Closed
wants to merge 3 commits into from
Closed

[HttpFoundation] Fix typo for ParameterBag getters #6278

wants to merge 3 commits into from

Conversation

rendler-denis
Copy link
Contributor

[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 ~

[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
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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". :)

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Member

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).

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xabbuh, I've also added a PR for the 3.0 branch. #6286

Thanks,
Denis

- 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
xabbuh added a commit that referenced this pull request Feb 17, 2016
…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
xabbuh added a commit that referenced this pull request Feb 17, 2016
@xabbuh
Copy link
Member

xabbuh commented Feb 17, 2016

Thank you @rendler-denis. I have merged your PR into the 2.3 branch. That's why your PR is shown as closed instead of merged. But you will still get the full credit for your contribution.

@xabbuh xabbuh closed this Feb 17, 2016
xabbuh added a commit that referenced this pull request Feb 17, 2016
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants