Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

use handleRequest() instead of bind()#2974

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
weaverryan merged 1 commit intosymfony:2.3fromxabbuh:issue-2969
Dec 17, 2013

Conversation

@xabbuh
Copy link
Member

QA
Doc fix?yes
New docs?no
Applies to2.3+
Fixed tickets#2969

@xabbuh
Copy link
MemberAuthor

#2965 should be merged before this.

@wouterj
Copy link
Member

-1 for the current state. It's the component docs, we should talk about using the form component without the HttpKernel extension awell as with the HttpKernel extension.

Copy link
Member

Choose a reason for hiding this comment

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

you should keep the information about the HttpFoundation integration too

@xabbuh
Copy link
MemberAuthor

So, if I understand this correctly, you'd pass the superglobals (i.e.$_REQUEST) tohandleRequest(), unless you have registered theHttpFoundationExtension?

@stof
Copy link
Member

@xabbuh No, when using the NativeRequestHandler, you call it without argument (or withnull as argument)

@xabbuh
Copy link
MemberAuthor

Thanks for the clarification. Think I got it. But, where is the advantage on using theHttpFoundationExtension. For me, calling$form->handleRequest() seems to be simpler than calling$form->handleRequest($request).

@stof
Copy link
Member

@xabbuh see the chapter of the doc describing the advantages of HttpFoundation orhttp://blog.servergrove.com/2013/09/23/symfony2-components-overview-httpfoundation/ for instance.
$form->handleRequest() looks simpler at first, until you start testing your code (it uses super globals, so it relies on a global state and your code will not be testable anymore with the BrowserKit shipped by HttpKernel directly).
If your application uses the HttpFoundation component, you should be using its integration so that your form operates on the same data than the app (it would be confusing if you use a listener to modify the legacy input of your app to the new format and the form does not use the processed input when binding for instance).

@xabbuh
Copy link
MemberAuthor

That makes sense. Should have thought of. Would it be useful to add your explanation to this section?

weaverryan added a commit that referenced this pull requestDec 17, 2013
Added some additional details about what's going on behind the scenes
@weaverryanweaverryan merged commita5c4a4f intosymfony:2.3Dec 17, 2013
@weaverryan
Copy link
Member

Thanks Christian! I've merged this and added a few more details about what's going on behind the scenes with the handlers (sha:1beb526). If you see any issues, let me know or make a PR of course :).

Cheers!

@xabbuhxabbuh deleted the issue-2969 branchDecember 17, 2013 22:22
weaverryan added a commit that referenced this pull requestDec 18, 2013
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@xabbuh@wouterj@stof@weaverryan

[8]ページ先頭

©2009-2025 Movatter.jp