Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpFoundation] Small phpdoc improvement #40973

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
merged 1 commit into from
Apr 30, 2021
Merged

[HttpFoundation] Small phpdoc improvement #40973

merged 1 commit into from
Apr 30, 2021

Conversation

flack
Copy link
Contributor

@flack flack commented Apr 28, 2021

Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

I have been looking for a way to emulate $_REQUEST in Symfony, and I always thought the get method is useless for that, because it only looks at some custom routing stuff, GET and whatever BODY might be. Only today I actually looked at the source code and found out that it's actually (almost) doing what I was looking for, i.e. check $_GET, and then $_POST. So I figured it would be good to be a bit more explicit in the phpdoc (analoguous to the phpdoc for $request->request, which says "Request body parameters ($_POST).").

@OskarStark OskarStark changed the title [http-foundation] Small phpdoc improvement [HttpFoundation] Small phpdoc improvement Apr 29, 2021
@carsonbot
Copy link

Hey!

I think @mcfedr has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@fabpot
Copy link
Member

fabpot commented Apr 29, 2021

This should probably be done in 4.4 instead.

@derrabus derrabus added this to the 4.4 milestone Apr 29, 2021
@flack flack changed the base branch from 5.x to 4.4 April 29, 2021 12:40
@flack
Copy link
Contributor Author

flack commented Apr 29, 2021

hmm, I tried simply chaing the branch, but bad things have happened. Should I close this and create a new PR, or is there some way to fix it?

@stof
Copy link
Member

stof commented Apr 29, 2021

@flack the bad thing is that your feature branch is still based on 5.x

@flack
Copy link
Contributor Author

flack commented Apr 29, 2021

@stof , thanks. I ran rebase --onto and that seems to have fixed it.

Some day I hope I'll get the hang of the symfony git workflow, but it could take a while... :-)

@stof
Copy link
Member

stof commented Apr 29, 2021

@flack that's exactly how to solve that (the case of rebasing a feature branch on top of an older target branch is not specific to Symfony's git workflow, which is why git rebase has this --onto option)

@flack
Copy link
Contributor Author

flack commented Apr 29, 2021

@stof yeah, I meant more the workflow of not merging to master and then downwards from there, but to the oldest applicable branch and then upwards (or something). But anyways, off-topic here I guess :-)

@stof
Copy link
Member

stof commented Apr 29, 2021

@flack you cannot merge downwards (as that would merge the whole 5.x history into 4.4). The Symfony process allows to maintian things with merges, meaning each commit exists only once in the history.
the alternative model does not merge downwards. It backports the patch (with git cherry-pick) but that duplicates the commit in the history (each branch has separate commits doing that patch), making it a lot harder to see what commits are included in the maintenance branch as there is nothing relating the backported commits to the original one (Doctrine switched to the merging model due to that)

@fabpot
Copy link
Member

fabpot commented Apr 30, 2021

Thank you @flack.

@fabpot fabpot merged commit 8679945 into symfony:4.4 Apr 30, 2021
MatTheCat pushed a commit to MatTheCat/symfony that referenced this pull request Apr 30, 2021
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Small phpdoc improvement

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

I have been looking for a way to emulate `$_REQUEST` in Symfony, and I always thought the `get` method is useless for that, because it only looks at some custom routing stuff, GET and whatever BODY might be. Only today I actually looked at the source code and found out that it's actually (almost) doing what I was looking for, i.e. check `$_GET`, and then `$_POST`. So I figured it would be good to be a bit more explicit in the phpdoc (analoguous to the phpdoc for `$request->request`, which says "Request body parameters ($_POST).").

Commits
-------

a53f256 Small phpdoc imporvement
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.

7 participants