{"action":"created","comment":{"url":"https://api.github.com/repos/libgraviton/graviton/pulls/comments/31117527","id":31117527,"diff_hunk":"@@ -0,0 +1,119 @@\n+<?php\n+/**\n+ * initerface for ReestUtils helper class\n+ */\n+\n+namespace Graviton\\RestBundle\\Service;\n+\n+use Symfony\\Component\\DependencyInjection\\ContainerInterface;\n+use Symfony\\Component\\Routing\\Route;\n+use Symfony\\Component\\Routing\\Router;\n+use JMS\\Serializer\\Serializer;\n+use JMS\\Serializer\\SerializationContext;\n+use Graviton\\RestBundle\\Controller\\RestController;\n+\n+/**\n+ * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>\n+ * @license  http://opensource.org/licenses/gpl-license.php GNU Public License\n+ * @link     http://swisscom.ch\n+ */\n+interface RestUtilsInterface\n+{\n+    /**\n+     * @param ContainerInterface   $container         container\n+     * @param Router               $router            router\n+     * @param Serializer           $serializer        serializer\n+     * @param SerializationContext $serializerContext context for serializer\n+     */\n+    public function __construct(","path":"src/Graviton/RestBundle/Service/RestUtilsInterface.php","position":28,"original_position":28,"commit_id":"750dbe2efe3806a8a42d3ae005c450b48ce837c7","original_commit_id":"750dbe2efe3806a8a42d3ae005c450b48ce837c7","user":{"login":"samsamann","id":4319351,"avatar_url":"https://avatars.githubusercontent.com/u/4319351?v=3","gravatar_id":"","url":"https://api.github.com/users/samsamann","html_url":"https://github.com/samsamann","followers_url":"https://api.github.com/users/samsamann/followers","following_url":"https://api.github.com/users/samsamann/following{/other_user}","gists_url":"https://api.github.com/users/samsamann/gists{/gist_id}","starred_url":"https://api.github.com/users/samsamann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsamann/subscriptions","organizations_url":"https://api.github.com/users/samsamann/orgs","repos_url":"https://api.github.com/users/samsamann/repos","events_url":"https://api.github.com/users/samsamann/events{/privacy}","received_events_url":"https://api.github.com/users/samsamann/received_events","type":"User","site_admin":false},"body":"Because it is a fix contract with concrete classes. The class which implements this interface can not extend the constructor. I think a interface should be independent and only define points of intersection.\r\n\r\nA factory is concerned about creation of an object and not an interface.","created_at":"2015-05-27T09:42:49Z","updated_at":"2015-05-27T09:42:49Z","html_url":"https://github.com/libgraviton/graviton/pull/124#discussion_r31117527","pull_request_url":"https://api.github.com/repos/libgraviton/graviton/pulls/124","_links":{"self":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/comments/31117527"},"html":{"href":"https://github.com/libgraviton/graviton/pull/124#discussion_r31117527"},"pull_request":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/124"}}},"pull_request":{"url":"https://api.github.com/repos/libgraviton/graviton/pulls/124","id":36242777,"html_url":"https://github.com/libgraviton/graviton/pull/124","diff_url":"https://github.com/libgraviton/graviton/pull/124.diff","patch_url":"https://github.com/libgraviton/graviton/pull/124.patch","issue_url":"https://api.github.com/repos/libgraviton/graviton/issues/124","number":124,"state":"open","locked":false,"title":"Make RestUtils testable again by adding an interface","user":{"login":"hairmare","id":116588,"avatar_url":"https://avatars.githubusercontent.com/u/116588?v=3","gravatar_id":"","url":"https://api.github.com/users/hairmare","html_url":"https://github.com/hairmare","followers_url":"https://api.github.com/users/hairmare/followers","following_url":"https://api.github.com/users/hairmare/following{/other_user}","gists_url":"https://api.github.com/users/hairmare/gists{/gist_id}","starred_url":"https://api.github.com/users/hairmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairmare/subscriptions","organizations_url":"https://api.github.com/users/hairmare/orgs","repos_url":"https://api.github.com/users/hairmare/repos","events_url":"https://api.github.com/users/hairmare/events{/privacy}","received_events_url":"https://api.github.com/users/hairmare/received_events","type":"User","site_admin":false},"body":"I made RestUtils final in #123 thus introducing breakage in #112. This is now being fixed by adding the ``RestUtilsInterface`` and coding against it.","created_at":"2015-05-26T20:35:22Z","updated_at":"2015-05-27T09:42:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e42a2d2e8082053e279a139455739401f3fad43","assignee":{"login":"lapistano","id":95115,"avatar_url":"https://avatars.githubusercontent.com/u/95115?v=3","gravatar_id":"","url":"https://api.github.com/users/lapistano","html_url":"https://github.com/lapistano","followers_url":"https://api.github.com/users/lapistano/followers","following_url":"https://api.github.com/users/lapistano/following{/other_user}","gists_url":"https://api.github.com/users/lapistano/gists{/gist_id}","starred_url":"https://api.github.com/users/lapistano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lapistano/subscriptions","organizations_url":"https://api.github.com/users/lapistano/orgs","repos_url":"https://api.github.com/users/lapistano/repos","events_url":"https://api.github.com/users/lapistano/events{/privacy}","received_events_url":"https://api.github.com/users/lapistano/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/libgraviton/graviton/pulls/124/commits","review_comments_url":"https://api.github.com/repos/libgraviton/graviton/pulls/124/comments","review_comment_url":"https://api.github.com/repos/libgraviton/graviton/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libgraviton/graviton/issues/124/comments","statuses_url":"https://api.github.com/repos/libgraviton/graviton/statuses/750dbe2efe3806a8a42d3ae005c450b48ce837c7","head":{"label":"libgraviton:feature/make-final-restutils-mockable","ref":"feature/make-final-restutils-mockable","sha":"750dbe2efe3806a8a42d3ae005c450b48ce837c7","user":{"login":"libgraviton","id":4174061,"avatar_url":"https://avatars.githubusercontent.com/u/4174061?v=3","gravatar_id":"","url":"https://api.github.com/users/libgraviton","html_url":"https://github.com/libgraviton","followers_url":"https://api.github.com/users/libgraviton/followers","following_url":"https://api.github.com/users/libgraviton/following{/other_user}","gists_url":"https://api.github.com/users/libgraviton/gists{/gist_id}","starred_url":"https://api.github.com/users/libgraviton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgraviton/subscriptions","organizations_url":"https://api.github.com/users/libgraviton/orgs","repos_url":"https://api.github.com/users/libgraviton/repos","events_url":"https://api.github.com/users/libgraviton/events{/privacy}","received_events_url":"https://api.github.com/users/libgraviton/received_events","type":"Organization","site_admin":false},"repo":{"id":13440432,"name":"graviton","full_name":"libgraviton/graviton","owner":{"login":"libgraviton","id":4174061,"avatar_url":"https://avatars.githubusercontent.com/u/4174061?v=3","gravatar_id":"","url":"https://api.github.com/users/libgraviton","html_url":"https://github.com/libgraviton","followers_url":"https://api.github.com/users/libgraviton/followers","following_url":"https://api.github.com/users/libgraviton/following{/other_user}","gists_url":"https://api.github.com/users/libgraviton/gists{/gist_id}","starred_url":"https://api.github.com/users/libgraviton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgraviton/subscriptions","organizations_url":"https://api.github.com/users/libgraviton/orgs","repos_url":"https://api.github.com/users/libgraviton/repos","events_url":"https://api.github.com/users/libgraviton/events{/privacy}","received_events_url":"https://api.github.com/users/libgraviton/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libgraviton/graviton","description":"","fork":false,"url":"https://api.github.com/repos/libgraviton/graviton","forks_url":"https://api.github.com/repos/libgraviton/graviton/forks","keys_url":"https://api.github.com/repos/libgraviton/graviton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgraviton/graviton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgraviton/graviton/teams","hooks_url":"https://api.github.com/repos/libgraviton/graviton/hooks","issue_events_url":"https://api.github.com/repos/libgraviton/graviton/issues/events{/number}","events_url":"https://api.github.com/repos/libgraviton/graviton/events","assignees_url":"https://api.github.com/repos/libgraviton/graviton/assignees{/user}","branches_url":"https://api.github.com/repos/libgraviton/graviton/branches{/branch}","tags_url":"https://api.github.com/repos/libgraviton/graviton/tags","blobs_url":"https://api.github.com/repos/libgraviton/graviton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgraviton/graviton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgraviton/graviton/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgraviton/graviton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgraviton/graviton/statuses/{sha}","languages_url":"https://api.github.com/repos/libgraviton/graviton/languages","stargazers_url":"https://api.github.com/repos/libgraviton/graviton/stargazers","contributors_url":"https://api.github.com/repos/libgraviton/graviton/contributors","subscribers_url":"https://api.github.com/repos/libgraviton/graviton/subscribers","subscription_url":"https://api.github.com/repos/libgraviton/graviton/subscription","commits_url":"https://api.github.com/repos/libgraviton/graviton/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgraviton/graviton/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgraviton/graviton/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgraviton/graviton/issues/comments{/number}","contents_url":"https://api.github.com/repos/libgraviton/graviton/contents/{+path}","compare_url":"https://api.github.com/repos/libgraviton/graviton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgraviton/graviton/merges","archive_url":"https://api.github.com/repos/libgraviton/graviton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgraviton/graviton/downloads","issues_url":"https://api.github.com/repos/libgraviton/graviton/issues{/number}","pulls_url":"https://api.github.com/repos/libgraviton/graviton/pulls{/number}","milestones_url":"https://api.github.com/repos/libgraviton/graviton/milestones{/number}","notifications_url":"https://api.github.com/repos/libgraviton/graviton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgraviton/graviton/labels{/name}","releases_url":"https://api.github.com/repos/libgraviton/graviton/releases{/id}","created_at":"2013-10-09T11:26:14Z","updated_at":"2015-05-08T10:33:52Z","pushed_at":"2015-05-27T08:47:04Z","git_url":"git://github.com/libgraviton/graviton.git","ssh_url":"git@github.com:libgraviton/graviton.git","clone_url":"https://github.com/libgraviton/graviton.git","svn_url":"https://github.com/libgraviton/graviton","homepage":"http://gravity-platform.github.io/","size":8486,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":2,"default_branch":"develop"}},"base":{"label":"libgraviton:develop","ref":"develop","sha":"f2b5f38d7e40253694ec54dd4bdb786dc2e86a5a","user":{"login":"libgraviton","id":4174061,"avatar_url":"https://avatars.githubusercontent.com/u/4174061?v=3","gravatar_id":"","url":"https://api.github.com/users/libgraviton","html_url":"https://github.com/libgraviton","followers_url":"https://api.github.com/users/libgraviton/followers","following_url":"https://api.github.com/users/libgraviton/following{/other_user}","gists_url":"https://api.github.com/users/libgraviton/gists{/gist_id}","starred_url":"https://api.github.com/users/libgraviton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgraviton/subscriptions","organizations_url":"https://api.github.com/users/libgraviton/orgs","repos_url":"https://api.github.com/users/libgraviton/repos","events_url":"https://api.github.com/users/libgraviton/events{/privacy}","received_events_url":"https://api.github.com/users/libgraviton/received_events","type":"Organization","site_admin":false},"repo":{"id":13440432,"name":"graviton","full_name":"libgraviton/graviton","owner":{"login":"libgraviton","id":4174061,"avatar_url":"https://avatars.githubusercontent.com/u/4174061?v=3","gravatar_id":"","url":"https://api.github.com/users/libgraviton","html_url":"https://github.com/libgraviton","followers_url":"https://api.github.com/users/libgraviton/followers","following_url":"https://api.github.com/users/libgraviton/following{/other_user}","gists_url":"https://api.github.com/users/libgraviton/gists{/gist_id}","starred_url":"https://api.github.com/users/libgraviton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgraviton/subscriptions","organizations_url":"https://api.github.com/users/libgraviton/orgs","repos_url":"https://api.github.com/users/libgraviton/repos","events_url":"https://api.github.com/users/libgraviton/events{/privacy}","received_events_url":"https://api.github.com/users/libgraviton/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libgraviton/graviton","description":"","fork":false,"url":"https://api.github.com/repos/libgraviton/graviton","forks_url":"https://api.github.com/repos/libgraviton/graviton/forks","keys_url":"https://api.github.com/repos/libgraviton/graviton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgraviton/graviton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgraviton/graviton/teams","hooks_url":"https://api.github.com/repos/libgraviton/graviton/hooks","issue_events_url":"https://api.github.com/repos/libgraviton/graviton/issues/events{/number}","events_url":"https://api.github.com/repos/libgraviton/graviton/events","assignees_url":"https://api.github.com/repos/libgraviton/graviton/assignees{/user}","branches_url":"https://api.github.com/repos/libgraviton/graviton/branches{/branch}","tags_url":"https://api.github.com/repos/libgraviton/graviton/tags","blobs_url":"https://api.github.com/repos/libgraviton/graviton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgraviton/graviton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgraviton/graviton/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgraviton/graviton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgraviton/graviton/statuses/{sha}","languages_url":"https://api.github.com/repos/libgraviton/graviton/languages","stargazers_url":"https://api.github.com/repos/libgraviton/graviton/stargazers","contributors_url":"https://api.github.com/repos/libgraviton/graviton/contributors","subscribers_url":"https://api.github.com/repos/libgraviton/graviton/subscribers","subscription_url":"https://api.github.com/repos/libgraviton/graviton/subscription","commits_url":"https://api.github.com/repos/libgraviton/graviton/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgraviton/graviton/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgraviton/graviton/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgraviton/graviton/issues/comments{/number}","contents_url":"https://api.github.com/repos/libgraviton/graviton/contents/{+path}","compare_url":"https://api.github.com/repos/libgraviton/graviton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgraviton/graviton/merges","archive_url":"https://api.github.com/repos/libgraviton/graviton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgraviton/graviton/downloads","issues_url":"https://api.github.com/repos/libgraviton/graviton/issues{/number}","pulls_url":"https://api.github.com/repos/libgraviton/graviton/pulls{/number}","milestones_url":"https://api.github.com/repos/libgraviton/graviton/milestones{/number}","notifications_url":"https://api.github.com/repos/libgraviton/graviton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgraviton/graviton/labels{/name}","releases_url":"https://api.github.com/repos/libgraviton/graviton/releases{/id}","created_at":"2013-10-09T11:26:14Z","updated_at":"2015-05-08T10:33:52Z","pushed_at":"2015-05-27T08:47:04Z","git_url":"git://github.com/libgraviton/graviton.git","ssh_url":"git@github.com:libgraviton/graviton.git","clone_url":"https://github.com/libgraviton/graviton.git","svn_url":"https://github.com/libgraviton/graviton","homepage":"http://gravity-platform.github.io/","size":8486,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/124"},"html":{"href":"https://github.com/libgraviton/graviton/pull/124"},"issue":{"href":"https://api.github.com/repos/libgraviton/graviton/issues/124"},"comments":{"href":"https://api.github.com/repos/libgraviton/graviton/issues/124/comments"},"review_comments":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/124/comments"},"review_comment":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/124/commits"},"statuses":{"href":"https://api.github.com/repos/libgraviton/graviton/statuses/750dbe2efe3806a8a42d3ae005c450b48ce837c7"}}}}