{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react/pulls/comments/34194129","id":34194129,"diff_hunk":"@@ -30,6 +30,26 @@ describe('cloneWithProps', function() {\n     onlyChild = require('onlyChild');\n     cloneWithProps = require('cloneWithProps');\n     emptyObject = require('emptyObject');\n+    spyOn(console, 'error');\n+  });\n+\n+  it('should warn because it is deprecated', function() {\n+    var Grandparent = React.createClass({\n+      render: function() {\n+        return <Parent><div /></Parent>;\n+      },\n+    });\n+    var Parent = React.createClass({\n+      render: function() {\n+        return (\n+          <div>\n+            {cloneWithProps(onlyChild(this.props.children), {})}\n+          </div>\n+        );\n+      },\n+    });\n+    var component = ReactTestUtils.renderIntoDocument(<Grandparent />);","path":"src/isomorphic/deprecated/__tests__/cloneWithProps-test.js","position":22,"original_position":22,"commit_id":"11c83ae1b9279b3aab0c77af83d6435c0baaf885","original_commit_id":"11c83ae1b9279b3aab0c77af83d6435c0baaf885","user":{"login":"jimfb","id":9595985,"avatar_url":"https://avatars.githubusercontent.com/u/9595985?v=3","gravatar_id":"","url":"https://api.github.com/users/jimfb","html_url":"https://github.com/jimfb","followers_url":"https://api.github.com/users/jimfb/followers","following_url":"https://api.github.com/users/jimfb/following{/other_user}","gists_url":"https://api.github.com/users/jimfb/gists{/gist_id}","starred_url":"https://api.github.com/users/jimfb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimfb/subscriptions","organizations_url":"https://api.github.com/users/jimfb/orgs","repos_url":"https://api.github.com/users/jimfb/repos","events_url":"https://api.github.com/users/jimfb/events{/privacy}","received_events_url":"https://api.github.com/users/jimfb/received_events","type":"User","site_admin":false},"body":"Why does Grandparent exist here?  Seems like it should just be ReactTestUtils.renderIntoDocument(<Parent><div /></Parent>);\r\n\r\nAlso, why are you saving the result as component?  The variable appears to be unused/unnecessary.","created_at":"2015-07-08T20:26:33Z","updated_at":"2015-07-08T20:26:33Z","html_url":"https://github.com/facebook/react/pull/4317#discussion_r34194129","pull_request_url":"https://api.github.com/repos/facebook/react/pulls/4317","_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/comments/34194129"},"html":{"href":"https://github.com/facebook/react/pull/4317#discussion_r34194129"},"pull_request":{"href":"https://api.github.com/repos/facebook/react/pulls/4317"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/4317","id":39497449,"html_url":"https://github.com/facebook/react/pull/4317","diff_url":"https://github.com/facebook/react/pull/4317.diff","patch_url":"https://github.com/facebook/react/pull/4317.patch","issue_url":"https://api.github.com/repos/facebook/react/issues/4317","number":4317,"state":"open","locked":false,"title":"Add runtime deprecation warning for cloneWithProps","user":{"login":"koba04","id":250407,"avatar_url":"https://avatars.githubusercontent.com/u/250407?v=3","gravatar_id":"","url":"https://api.github.com/users/koba04","html_url":"https://github.com/koba04","followers_url":"https://api.github.com/users/koba04/followers","following_url":"https://api.github.com/users/koba04/following{/other_user}","gists_url":"https://api.github.com/users/koba04/gists{/gist_id}","starred_url":"https://api.github.com/users/koba04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koba04/subscriptions","organizations_url":"https://api.github.com/users/koba04/orgs","repos_url":"https://api.github.com/users/koba04/repos","events_url":"https://api.github.com/users/koba04/events{/privacy}","received_events_url":"https://api.github.com/users/koba04/received_events","type":"User","site_admin":false},"body":"Fixed #4245","created_at":"2015-07-08T16:38:43Z","updated_at":"2015-07-08T20:26:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef6819ea9bf9fb7a153fd1a8402738ce09ae3236","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react/pulls/4317/commits","review_comments_url":"https://api.github.com/repos/facebook/react/pulls/4317/comments","review_comment_url":"https://api.github.com/repos/facebook/react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react/issues/4317/comments","statuses_url":"https://api.github.com/repos/facebook/react/statuses/11c83ae1b9279b3aab0c77af83d6435c0baaf885","head":{"label":"koba04:add-deprecation-warning-for-clonewithprops","ref":"add-deprecation-warning-for-clonewithprops","sha":"11c83ae1b9279b3aab0c77af83d6435c0baaf885","user":{"login":"koba04","id":250407,"avatar_url":"https://avatars.githubusercontent.com/u/250407?v=3","gravatar_id":"","url":"https://api.github.com/users/koba04","html_url":"https://github.com/koba04","followers_url":"https://api.github.com/users/koba04/followers","following_url":"https://api.github.com/users/koba04/following{/other_user}","gists_url":"https://api.github.com/users/koba04/gists{/gist_id}","starred_url":"https://api.github.com/users/koba04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koba04/subscriptions","organizations_url":"https://api.github.com/users/koba04/orgs","repos_url":"https://api.github.com/users/koba04/repos","events_url":"https://api.github.com/users/koba04/events{/privacy}","received_events_url":"https://api.github.com/users/koba04/received_events","type":"User","site_admin":false},"repo":{"id":27382217,"name":"react","full_name":"koba04/react","owner":{"login":"koba04","id":250407,"avatar_url":"https://avatars.githubusercontent.com/u/250407?v=3","gravatar_id":"","url":"https://api.github.com/users/koba04","html_url":"https://github.com/koba04","followers_url":"https://api.github.com/users/koba04/followers","following_url":"https://api.github.com/users/koba04/following{/other_user}","gists_url":"https://api.github.com/users/koba04/gists{/gist_id}","starred_url":"https://api.github.com/users/koba04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koba04/subscriptions","organizations_url":"https://api.github.com/users/koba04/orgs","repos_url":"https://api.github.com/users/koba04/repos","events_url":"https://api.github.com/users/koba04/events{/privacy}","received_events_url":"https://api.github.com/users/koba04/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/koba04/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":true,"url":"https://api.github.com/repos/koba04/react","forks_url":"https://api.github.com/repos/koba04/react/forks","keys_url":"https://api.github.com/repos/koba04/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koba04/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koba04/react/teams","hooks_url":"https://api.github.com/repos/koba04/react/hooks","issue_events_url":"https://api.github.com/repos/koba04/react/issues/events{/number}","events_url":"https://api.github.com/repos/koba04/react/events","assignees_url":"https://api.github.com/repos/koba04/react/assignees{/user}","branches_url":"https://api.github.com/repos/koba04/react/branches{/branch}","tags_url":"https://api.github.com/repos/koba04/react/tags","blobs_url":"https://api.github.com/repos/koba04/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koba04/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koba04/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/koba04/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koba04/react/statuses/{sha}","languages_url":"https://api.github.com/repos/koba04/react/languages","stargazers_url":"https://api.github.com/repos/koba04/react/stargazers","contributors_url":"https://api.github.com/repos/koba04/react/contributors","subscribers_url":"https://api.github.com/repos/koba04/react/subscribers","subscription_url":"https://api.github.com/repos/koba04/react/subscription","commits_url":"https://api.github.com/repos/koba04/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/koba04/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/koba04/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/koba04/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/koba04/react/contents/{+path}","compare_url":"https://api.github.com/repos/koba04/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koba04/react/merges","archive_url":"https://api.github.com/repos/koba04/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koba04/react/downloads","issues_url":"https://api.github.com/repos/koba04/react/issues{/number}","pulls_url":"https://api.github.com/repos/koba04/react/pulls{/number}","milestones_url":"https://api.github.com/repos/koba04/react/milestones{/number}","notifications_url":"https://api.github.com/repos/koba04/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koba04/react/labels{/name}","releases_url":"https://api.github.com/repos/koba04/react/releases{/id}","created_at":"2014-12-01T14:08:21Z","updated_at":"2015-02-02T00:45:13Z","pushed_at":"2015-07-08T16:38:16Z","git_url":"git://github.com/koba04/react.git","ssh_url":"git@github.com:koba04/react.git","clone_url":"https://github.com/koba04/react.git","svn_url":"https://github.com/koba04/react","homepage":"http://facebook.github.io/react/","size":50486,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"6eaf03df1a6509ef933dc01a2dcb67beaa99ac86","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":10270250,"name":"react","full_name":"facebook/react","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":false,"url":"https://api.github.com/repos/facebook/react","forks_url":"https://api.github.com/repos/facebook/react/forks","keys_url":"https://api.github.com/repos/facebook/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react/teams","hooks_url":"https://api.github.com/repos/facebook/react/hooks","issue_events_url":"https://api.github.com/repos/facebook/react/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react/events","assignees_url":"https://api.github.com/repos/facebook/react/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react/tags","blobs_url":"https://api.github.com/repos/facebook/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react/languages","stargazers_url":"https://api.github.com/repos/facebook/react/stargazers","contributors_url":"https://api.github.com/repos/facebook/react/contributors","subscribers_url":"https://api.github.com/repos/facebook/react/subscribers","subscription_url":"https://api.github.com/repos/facebook/react/subscription","commits_url":"https://api.github.com/repos/facebook/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react/merges","archive_url":"https://api.github.com/repos/facebook/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react/downloads","issues_url":"https://api.github.com/repos/facebook/react/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react/releases{/id}","created_at":"2013-05-24T16:15:54Z","updated_at":"2015-07-08T20:03:26Z","pushed_at":"2015-07-08T19:17:35Z","git_url":"git://github.com/facebook/react.git","ssh_url":"git@github.com:facebook/react.git","clone_url":"https://github.com/facebook/react.git","svn_url":"https://github.com/facebook/react","homepage":"https://facebook.github.io/react/","size":105417,"stargazers_count":24564,"watchers_count":24564,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3573,"mirror_url":null,"open_issues_count":585,"forks":3573,"open_issues":585,"watchers":24564,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/4317"},"html":{"href":"https://github.com/facebook/react/pull/4317"},"issue":{"href":"https://api.github.com/repos/facebook/react/issues/4317"},"comments":{"href":"https://api.github.com/repos/facebook/react/issues/4317/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react/pulls/4317/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react/pulls/4317/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react/statuses/11c83ae1b9279b3aab0c77af83d6435c0baaf885"}}}}