{"action":"created","comment":{"url":"https://api.github.com/repos/api-platform/core/pulls/comments/83061475","pull_request_review_id":3926829,"id":83061475,"diff_hunk":"@@ -37,11 +39,17 @@ public function normalize($object, $format = null, array $context = [])\n \n     /**\n      * {@inheritdoc}\n+     *\n+     * @throws InvalidArgumentException\n      */\n     public function denormalize($data, $class, $format = null, array $context = [])\n     {\n         // Avoid issues with proxies if we populated the object\n         if (isset($data['id']) && !isset($context['object_to_populate'])) {\n+            if (isset($context['allow_update']) && true !== $context['allow_update']) {","path":"src/Serializer/ItemNormalizer.php","position":20,"original_position":20,"commit_id":"09bbb1d7b96a7345dcadb477f246ea89aa8d4aa7","original_commit_id":"11c26fbd0bc478f1f92256705c6ff0b6f3e68aca","user":{"login":"dunglas","id":57224,"avatar_url":"https://avatars.githubusercontent.com/u/57224?v=3","gravatar_id":"","url":"https://api.github.com/users/dunglas","html_url":"https://github.com/dunglas","followers_url":"https://api.github.com/users/dunglas/followers","following_url":"https://api.github.com/users/dunglas/following{/other_user}","gists_url":"https://api.github.com/users/dunglas/gists{/gist_id}","starred_url":"https://api.github.com/users/dunglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dunglas/subscriptions","organizations_url":"https://api.github.com/users/dunglas/orgs","repos_url":"https://api.github.com/users/dunglas/repos","events_url":"https://api.github.com/users/dunglas/events{/privacy}","received_events_url":"https://api.github.com/users/dunglas/received_events","type":"User","site_admin":false},"body":"Ok. Let's do this.\r\n@meyerbaptiste can you update the PR accordingly?","created_at":"2016-10-12T17:52:44Z","updated_at":"2016-10-12T17:52:44Z","html_url":"https://github.com/api-platform/core/pull/776#discussion_r83061475","pull_request_url":"https://api.github.com/repos/api-platform/core/pulls/776","_links":{"self":{"href":"https://api.github.com/repos/api-platform/core/pulls/comments/83061475"},"html":{"href":"https://github.com/api-platform/core/pull/776#discussion_r83061475"},"pull_request":{"href":"https://api.github.com/repos/api-platform/core/pulls/776"}}},"pull_request":{"url":"https://api.github.com/repos/api-platform/core/pulls/776","id":87309830,"html_url":"https://github.com/api-platform/core/pull/776","diff_url":"https://github.com/api-platform/core/pull/776.diff","patch_url":"https://github.com/api-platform/core/pull/776.patch","issue_url":"https://api.github.com/repos/api-platform/core/issues/776","number":776,"state":"open","locked":false,"title":"Fix api-platform/api-platform#132: disallow update for non-PUT methods","user":{"login":"meyerbaptiste","id":4034907,"avatar_url":"https://avatars.githubusercontent.com/u/4034907?v=3","gravatar_id":"","url":"https://api.github.com/users/meyerbaptiste","html_url":"https://github.com/meyerbaptiste","followers_url":"https://api.github.com/users/meyerbaptiste/followers","following_url":"https://api.github.com/users/meyerbaptiste/following{/other_user}","gists_url":"https://api.github.com/users/meyerbaptiste/gists{/gist_id}","starred_url":"https://api.github.com/users/meyerbaptiste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meyerbaptiste/subscriptions","organizations_url":"https://api.github.com/users/meyerbaptiste/orgs","repos_url":"https://api.github.com/users/meyerbaptiste/repos","events_url":"https://api.github.com/users/meyerbaptiste/events{/privacy}","received_events_url":"https://api.github.com/users/meyerbaptiste/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | yes\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | api-platform/api-platform#132\r\n| License       | MIT\r\n| Doc PR        | N/A\r\n\r\nThis PR fixes api-platform/api-platform#132 by adding a new parameter (`allow_update`) in the denormalization context.\r\nUpdate is now disallowed for an operation if `allow_update` is set to `false`.\r\nCurrently only the `PUT` method allows update. Else it results in an HTTP status codes 400.\r\n","created_at":"2016-09-29T13:09:58Z","updated_at":"2016-10-12T17:52:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfa759ce0c323efe069489f83f9c92695133d9f7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/api-platform/core/pulls/776/commits","review_comments_url":"https://api.github.com/repos/api-platform/core/pulls/776/comments","review_comment_url":"https://api.github.com/repos/api-platform/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/api-platform/core/issues/776/comments","statuses_url":"https://api.github.com/repos/api-platform/core/statuses/09bbb1d7b96a7345dcadb477f246ea89aa8d4aa7","head":{"label":"meyerbaptiste:fix_api_platform_132","ref":"fix_api_platform_132","sha":"09bbb1d7b96a7345dcadb477f246ea89aa8d4aa7","user":{"login":"meyerbaptiste","id":4034907,"avatar_url":"https://avatars.githubusercontent.com/u/4034907?v=3","gravatar_id":"","url":"https://api.github.com/users/meyerbaptiste","html_url":"https://github.com/meyerbaptiste","followers_url":"https://api.github.com/users/meyerbaptiste/followers","following_url":"https://api.github.com/users/meyerbaptiste/following{/other_user}","gists_url":"https://api.github.com/users/meyerbaptiste/gists{/gist_id}","starred_url":"https://api.github.com/users/meyerbaptiste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meyerbaptiste/subscriptions","organizations_url":"https://api.github.com/users/meyerbaptiste/orgs","repos_url":"https://api.github.com/users/meyerbaptiste/repos","events_url":"https://api.github.com/users/meyerbaptiste/events{/privacy}","received_events_url":"https://api.github.com/users/meyerbaptiste/received_events","type":"User","site_admin":false},"repo":{"id":68818371,"name":"core","full_name":"meyerbaptiste/core","owner":{"login":"meyerbaptiste","id":4034907,"avatar_url":"https://avatars.githubusercontent.com/u/4034907?v=3","gravatar_id":"","url":"https://api.github.com/users/meyerbaptiste","html_url":"https://github.com/meyerbaptiste","followers_url":"https://api.github.com/users/meyerbaptiste/followers","following_url":"https://api.github.com/users/meyerbaptiste/following{/other_user}","gists_url":"https://api.github.com/users/meyerbaptiste/gists{/gist_id}","starred_url":"https://api.github.com/users/meyerbaptiste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meyerbaptiste/subscriptions","organizations_url":"https://api.github.com/users/meyerbaptiste/orgs","repos_url":"https://api.github.com/users/meyerbaptiste/repos","events_url":"https://api.github.com/users/meyerbaptiste/events{/privacy}","received_events_url":"https://api.github.com/users/meyerbaptiste/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/meyerbaptiste/core","description":"The Hypermedia REST API component of API Platform: JSON-LD and Hydra support, works with Symfony too","fork":true,"url":"https://api.github.com/repos/meyerbaptiste/core","forks_url":"https://api.github.com/repos/meyerbaptiste/core/forks","keys_url":"https://api.github.com/repos/meyerbaptiste/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meyerbaptiste/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meyerbaptiste/core/teams","hooks_url":"https://api.github.com/repos/meyerbaptiste/core/hooks","issue_events_url":"https://api.github.com/repos/meyerbaptiste/core/issues/events{/number}","events_url":"https://api.github.com/repos/meyerbaptiste/core/events","assignees_url":"https://api.github.com/repos/meyerbaptiste/core/assignees{/user}","branches_url":"https://api.github.com/repos/meyerbaptiste/core/branches{/branch}","tags_url":"https://api.github.com/repos/meyerbaptiste/core/tags","blobs_url":"https://api.github.com/repos/meyerbaptiste/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meyerbaptiste/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meyerbaptiste/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/meyerbaptiste/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meyerbaptiste/core/statuses/{sha}","languages_url":"https://api.github.com/repos/meyerbaptiste/core/languages","stargazers_url":"https://api.github.com/repos/meyerbaptiste/core/stargazers","contributors_url":"https://api.github.com/repos/meyerbaptiste/core/contributors","subscribers_url":"https://api.github.com/repos/meyerbaptiste/core/subscribers","subscription_url":"https://api.github.com/repos/meyerbaptiste/core/subscription","commits_url":"https://api.github.com/repos/meyerbaptiste/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/meyerbaptiste/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/meyerbaptiste/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/meyerbaptiste/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/meyerbaptiste/core/contents/{+path}","compare_url":"https://api.github.com/repos/meyerbaptiste/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meyerbaptiste/core/merges","archive_url":"https://api.github.com/repos/meyerbaptiste/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meyerbaptiste/core/downloads","issues_url":"https://api.github.com/repos/meyerbaptiste/core/issues{/number}","pulls_url":"https://api.github.com/repos/meyerbaptiste/core/pulls{/number}","milestones_url":"https://api.github.com/repos/meyerbaptiste/core/milestones{/number}","notifications_url":"https://api.github.com/repos/meyerbaptiste/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meyerbaptiste/core/labels{/name}","releases_url":"https://api.github.com/repos/meyerbaptiste/core/releases{/id}","deployments_url":"https://api.github.com/repos/meyerbaptiste/core/deployments","created_at":"2016-09-21T13:14:50Z","updated_at":"2016-09-21T13:14:52Z","pushed_at":"2016-10-12T16:46:32Z","git_url":"git://github.com/meyerbaptiste/core.git","ssh_url":"git@github.com:meyerbaptiste/core.git","clone_url":"https://github.com/meyerbaptiste/core.git","svn_url":"https://github.com/meyerbaptiste/core","homepage":"https://api-platform.com","size":3646,"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":"api-platform:master","ref":"master","sha":"6048700d33296eae717bc622b9e9dcb47b7f4639","user":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars.githubusercontent.com/u/13420081?v=3","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":29501260,"name":"core","full_name":"api-platform/core","owner":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars.githubusercontent.com/u/13420081?v=3","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/api-platform/core","description":"The Hypermedia REST API component of API Platform: JSON-LD and Hydra support, works with Symfony too","fork":false,"url":"https://api.github.com/repos/api-platform/core","forks_url":"https://api.github.com/repos/api-platform/core/forks","keys_url":"https://api.github.com/repos/api-platform/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/api-platform/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/api-platform/core/teams","hooks_url":"https://api.github.com/repos/api-platform/core/hooks","issue_events_url":"https://api.github.com/repos/api-platform/core/issues/events{/number}","events_url":"https://api.github.com/repos/api-platform/core/events","assignees_url":"https://api.github.com/repos/api-platform/core/assignees{/user}","branches_url":"https://api.github.com/repos/api-platform/core/branches{/branch}","tags_url":"https://api.github.com/repos/api-platform/core/tags","blobs_url":"https://api.github.com/repos/api-platform/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/api-platform/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/api-platform/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/api-platform/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/api-platform/core/statuses/{sha}","languages_url":"https://api.github.com/repos/api-platform/core/languages","stargazers_url":"https://api.github.com/repos/api-platform/core/stargazers","contributors_url":"https://api.github.com/repos/api-platform/core/contributors","subscribers_url":"https://api.github.com/repos/api-platform/core/subscribers","subscription_url":"https://api.github.com/repos/api-platform/core/subscription","commits_url":"https://api.github.com/repos/api-platform/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/api-platform/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/api-platform/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/api-platform/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/api-platform/core/contents/{+path}","compare_url":"https://api.github.com/repos/api-platform/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/api-platform/core/merges","archive_url":"https://api.github.com/repos/api-platform/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/api-platform/core/downloads","issues_url":"https://api.github.com/repos/api-platform/core/issues{/number}","pulls_url":"https://api.github.com/repos/api-platform/core/pulls{/number}","milestones_url":"https://api.github.com/repos/api-platform/core/milestones{/number}","notifications_url":"https://api.github.com/repos/api-platform/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/api-platform/core/labels{/name}","releases_url":"https://api.github.com/repos/api-platform/core/releases{/id}","deployments_url":"https://api.github.com/repos/api-platform/core/deployments","created_at":"2015-01-19T23:05:56Z","updated_at":"2016-10-11T11:37:21Z","pushed_at":"2016-10-12T16:44:39Z","git_url":"git://github.com/api-platform/core.git","ssh_url":"git@github.com:api-platform/core.git","clone_url":"https://github.com/api-platform/core.git","svn_url":"https://github.com/api-platform/core","homepage":"https://api-platform.com","size":4426,"stargazers_count":351,"watchers_count":351,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":99,"mirror_url":null,"open_issues_count":68,"forks":99,"open_issues":68,"watchers":351,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/api-platform/core/pulls/776"},"html":{"href":"https://github.com/api-platform/core/pull/776"},"issue":{"href":"https://api.github.com/repos/api-platform/core/issues/776"},"comments":{"href":"https://api.github.com/repos/api-platform/core/issues/776/comments"},"review_comments":{"href":"https://api.github.com/repos/api-platform/core/pulls/776/comments"},"review_comment":{"href":"https://api.github.com/repos/api-platform/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/api-platform/core/pulls/776/commits"},"statuses":{"href":"https://api.github.com/repos/api-platform/core/statuses/09bbb1d7b96a7345dcadb477f246ea89aa8d4aa7"}}}}
{"actor":{"display_login":"dunglas"}}