{"action":"created","comment":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/comments/25634956","id":25634956,"diff_hunk":"@@ -0,0 +1,53 @@\n+<?php\n+\n+/*\n+ * This file is part of the FOSRestBundle package.\n+ *\n+ * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace FOS\\RestBundle\\Util;\n+\n+use Symfony\\Component\\HttpFoundation\\Request;\n+\n+/**\n+ * Utility class for request-related functions.\n+ *\n+ * @internal Should not be called by user code\n+ *\n+ * @author Florian Voutzinos <florian@voutzinos.com>\n+ */\n+final class RequestUtil\n+{\n+    /**\n+     * Checks if the request is a form post.\n+     *\n+     * @param Request $request\n+     *\n+     * @return boolean\n+     */\n+    public static function isFormPost(Request $request)\n+    {\n+        if (!$request->isMethod('POST')) {","path":"Util/RequestUtil.php","position":34,"original_position":34,"commit_id":"aca1b72877729a7ecbe05992b89cd05680a64829","original_commit_id":"aca1b72877729a7ecbe05992b89cd05680a64829","user":{"login":"florianv","id":1586668,"avatar_url":"https://avatars.githubusercontent.com/u/1586668?v=3","gravatar_id":"","url":"https://api.github.com/users/florianv","html_url":"https://github.com/florianv","followers_url":"https://api.github.com/users/florianv/followers","following_url":"https://api.github.com/users/florianv/following{/other_user}","gists_url":"https://api.github.com/users/florianv/gists{/gist_id}","starred_url":"https://api.github.com/users/florianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianv/subscriptions","organizations_url":"https://api.github.com/users/florianv/orgs","repos_url":"https://api.github.com/users/florianv/repos","events_url":"https://api.github.com/users/florianv/events{/privacy}","received_events_url":"https://api.github.com/users/florianv/received_events","type":"User","site_admin":false},"body":"Indeed these cases are missing. I will move this code to a private listener method as @lsmith77 suggested and add extra tests for this","created_at":"2015-03-02T20:27:06Z","updated_at":"2015-03-02T20:27:06Z","html_url":"https://github.com/FriendsOfSymfony/FOSRestBundle/pull/979#discussion_r25634956","pull_request_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/979","_links":{"self":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/comments/25634956"},"html":{"href":"https://github.com/FriendsOfSymfony/FOSRestBundle/pull/979#discussion_r25634956"},"pull_request":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/979"}}},"pull_request":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/979","id":30193356,"html_url":"https://github.com/FriendsOfSymfony/FOSRestBundle/pull/979","diff_url":"https://github.com/FriendsOfSymfony/FOSRestBundle/pull/979.diff","patch_url":"https://github.com/FriendsOfSymfony/FOSRestBundle/pull/979.patch","issue_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/issues/979","number":979,"state":"open","locked":false,"title":"Fixed array normalization for form post","user":{"login":"florianv","id":1586668,"avatar_url":"https://avatars.githubusercontent.com/u/1586668?v=3","gravatar_id":"","url":"https://api.github.com/users/florianv","html_url":"https://github.com/florianv","followers_url":"https://api.github.com/users/florianv/followers","following_url":"https://api.github.com/users/florianv/following{/other_user}","gists_url":"https://api.github.com/users/florianv/gists{/gist_id}","starred_url":"https://api.github.com/users/florianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianv/subscriptions","organizations_url":"https://api.github.com/users/florianv/orgs","repos_url":"https://api.github.com/users/florianv/repos","events_url":"https://api.github.com/users/florianv/events{/privacy}","received_events_url":"https://api.github.com/users/florianv/received_events","type":"User","site_admin":false},"body":"Fix for issue https://github.com/FriendsOfSymfony/FOSRestBundle/issues/976","created_at":"2015-02-27T19:28:00Z","updated_at":"2015-03-02T20:27:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6d1b9e35103237c8499c7757f8ee850e20a1ddc4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/979/commits","review_comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/979/comments","review_comment_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/issues/979/comments","statuses_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/statuses/aca1b72877729a7ecbe05992b89cd05680a64829","head":{"label":"florianv:array-normalizer","ref":"array-normalizer","sha":"aca1b72877729a7ecbe05992b89cd05680a64829","user":{"login":"florianv","id":1586668,"avatar_url":"https://avatars.githubusercontent.com/u/1586668?v=3","gravatar_id":"","url":"https://api.github.com/users/florianv","html_url":"https://github.com/florianv","followers_url":"https://api.github.com/users/florianv/followers","following_url":"https://api.github.com/users/florianv/following{/other_user}","gists_url":"https://api.github.com/users/florianv/gists{/gist_id}","starred_url":"https://api.github.com/users/florianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianv/subscriptions","organizations_url":"https://api.github.com/users/florianv/orgs","repos_url":"https://api.github.com/users/florianv/repos","events_url":"https://api.github.com/users/florianv/events{/privacy}","received_events_url":"https://api.github.com/users/florianv/received_events","type":"User","site_admin":false},"repo":{"id":18465690,"name":"FOSRestBundle","full_name":"florianv/FOSRestBundle","owner":{"login":"florianv","id":1586668,"avatar_url":"https://avatars.githubusercontent.com/u/1586668?v=3","gravatar_id":"","url":"https://api.github.com/users/florianv","html_url":"https://github.com/florianv","followers_url":"https://api.github.com/users/florianv/followers","following_url":"https://api.github.com/users/florianv/following{/other_user}","gists_url":"https://api.github.com/users/florianv/gists{/gist_id}","starred_url":"https://api.github.com/users/florianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianv/subscriptions","organizations_url":"https://api.github.com/users/florianv/orgs","repos_url":"https://api.github.com/users/florianv/repos","events_url":"https://api.github.com/users/florianv/events{/privacy}","received_events_url":"https://api.github.com/users/florianv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/florianv/FOSRestBundle","description":"This Bundle provides various tools to rapidly develop RESTful API's with Symfony2","fork":true,"url":"https://api.github.com/repos/florianv/FOSRestBundle","forks_url":"https://api.github.com/repos/florianv/FOSRestBundle/forks","keys_url":"https://api.github.com/repos/florianv/FOSRestBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/florianv/FOSRestBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/florianv/FOSRestBundle/teams","hooks_url":"https://api.github.com/repos/florianv/FOSRestBundle/hooks","issue_events_url":"https://api.github.com/repos/florianv/FOSRestBundle/issues/events{/number}","events_url":"https://api.github.com/repos/florianv/FOSRestBundle/events","assignees_url":"https://api.github.com/repos/florianv/FOSRestBundle/assignees{/user}","branches_url":"https://api.github.com/repos/florianv/FOSRestBundle/branches{/branch}","tags_url":"https://api.github.com/repos/florianv/FOSRestBundle/tags","blobs_url":"https://api.github.com/repos/florianv/FOSRestBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/florianv/FOSRestBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/florianv/FOSRestBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/florianv/FOSRestBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/florianv/FOSRestBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/florianv/FOSRestBundle/languages","stargazers_url":"https://api.github.com/repos/florianv/FOSRestBundle/stargazers","contributors_url":"https://api.github.com/repos/florianv/FOSRestBundle/contributors","subscribers_url":"https://api.github.com/repos/florianv/FOSRestBundle/subscribers","subscription_url":"https://api.github.com/repos/florianv/FOSRestBundle/subscription","commits_url":"https://api.github.com/repos/florianv/FOSRestBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/florianv/FOSRestBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/florianv/FOSRestBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/florianv/FOSRestBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/florianv/FOSRestBundle/contents/{+path}","compare_url":"https://api.github.com/repos/florianv/FOSRestBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/florianv/FOSRestBundle/merges","archive_url":"https://api.github.com/repos/florianv/FOSRestBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/florianv/FOSRestBundle/downloads","issues_url":"https://api.github.com/repos/florianv/FOSRestBundle/issues{/number}","pulls_url":"https://api.github.com/repos/florianv/FOSRestBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/florianv/FOSRestBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/florianv/FOSRestBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/florianv/FOSRestBundle/labels{/name}","releases_url":"https://api.github.com/repos/florianv/FOSRestBundle/releases{/id}","created_at":"2014-04-05T11:42:11Z","updated_at":"2014-06-04T13:40:12Z","pushed_at":"2015-03-02T20:04:56Z","git_url":"git://github.com/florianv/FOSRestBundle.git","ssh_url":"git@github.com:florianv/FOSRestBundle.git","clone_url":"https://github.com/florianv/FOSRestBundle.git","svn_url":"https://github.com/florianv/FOSRestBundle","homepage":"http://friendsofsymfony.github.com/","size":2916,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"FriendsOfSymfony:master","ref":"master","sha":"02fd6423543d673946246c7f74a738099951aaff","user":{"login":"FriendsOfSymfony","id":529709,"avatar_url":"https://avatars.githubusercontent.com/u/529709?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfSymfony","html_url":"https://github.com/FriendsOfSymfony","followers_url":"https://api.github.com/users/FriendsOfSymfony/followers","following_url":"https://api.github.com/users/FriendsOfSymfony/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfSymfony/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfSymfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfSymfony/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfSymfony/orgs","repos_url":"https://api.github.com/users/FriendsOfSymfony/repos","events_url":"https://api.github.com/users/FriendsOfSymfony/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfSymfony/received_events","type":"Organization","site_admin":false},"repo":{"id":1509011,"name":"FOSRestBundle","full_name":"FriendsOfSymfony/FOSRestBundle","owner":{"login":"FriendsOfSymfony","id":529709,"avatar_url":"https://avatars.githubusercontent.com/u/529709?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfSymfony","html_url":"https://github.com/FriendsOfSymfony","followers_url":"https://api.github.com/users/FriendsOfSymfony/followers","following_url":"https://api.github.com/users/FriendsOfSymfony/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfSymfony/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfSymfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfSymfony/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfSymfony/orgs","repos_url":"https://api.github.com/users/FriendsOfSymfony/repos","events_url":"https://api.github.com/users/FriendsOfSymfony/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfSymfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FriendsOfSymfony/FOSRestBundle","description":"This Bundle provides various tools to rapidly develop RESTful API's with Symfony2","fork":false,"url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle","forks_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/forks","keys_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/teams","hooks_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/hooks","issue_events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/issues/events{/number}","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/events","assignees_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/assignees{/user}","branches_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/branches{/branch}","tags_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/tags","blobs_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/languages","stargazers_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/stargazers","contributors_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/contributors","subscribers_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/subscribers","subscription_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/subscription","commits_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/contents/{+path}","compare_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/merges","archive_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/downloads","issues_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/issues{/number}","pulls_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/labels{/name}","releases_url":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/releases{/id}","created_at":"2011-03-21T23:14:13Z","updated_at":"2015-03-02T20:03:29Z","pushed_at":"2015-03-02T20:03:28Z","git_url":"git://github.com/FriendsOfSymfony/FOSRestBundle.git","ssh_url":"git@github.com:FriendsOfSymfony/FOSRestBundle.git","clone_url":"https://github.com/FriendsOfSymfony/FOSRestBundle.git","svn_url":"https://github.com/FriendsOfSymfony/FOSRestBundle","homepage":"http://friendsofsymfony.github.com/","size":6215,"stargazers_count":1086,"watchers_count":1086,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":429,"mirror_url":null,"open_issues_count":82,"forks":429,"open_issues":82,"watchers":1086,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/979"},"html":{"href":"https://github.com/FriendsOfSymfony/FOSRestBundle/pull/979"},"issue":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/issues/979"},"comments":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/issues/979/comments"},"review_comments":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/979/comments"},"review_comment":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/pulls/979/commits"},"statuses":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/statuses/aca1b72877729a7ecbe05992b89cd05680a64829"}}}}