{"action":"created","comment":{"url":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/comments/88798898","pull_request_review_id":9362189,"id":88798898,"diff_hunk":"@@ -0,0 +1,65 @@\n+<?php\n+\n+namespace Codete\\FormGeneratorBundle\\Form\\Type;\n+\n+use Codete\\FormGeneratorBundle\\FormGenerator;\n+use Symfony\\Component\\Form\\AbstractType;\n+use Symfony\\Component\\Form\\FormBuilderInterface;\n+use Symfony\\Component\\OptionsResolver\\OptionsResolver;\n+\n+\n+class EmbedType extends AbstractType\n+{\n+    /**\n+     * @var FormGenerator $formGenerator\n+     */\n+    private $formGenerator;\n+\n+    /**\n+     * @param FormGenerator $formGenerator\n+     */\n+    public function __construct(FormGenerator $formGenerator)\n+    {\n+        $this->formGenerator = $formGenerator;\n+    }\n+\n+    /**\n+     * @param FormBuilderInterface $builder\n+     * @param array $options\n+     */\n+    public function buildForm(FormBuilderInterface $builder, array $options)\n+    {\n+        $class = $options['class'];\n+        $this->formGenerator->populateFormBuilder($builder, new $class, $options['view'], isset($options['context']) ? $options['context'] : []);","path":"Form/Type/EmbedType.php","position":33,"original_position":33,"commit_id":"e27665bec83c8d77311904d290f3213d9657d279","original_commit_id":"e27665bec83c8d77311904d290f3213d9657d279","user":{"login":"malarzm","id":4947711,"avatar_url":"https://avatars.githubusercontent.com/u/4947711?v=3","gravatar_id":"","url":"https://api.github.com/users/malarzm","html_url":"https://github.com/malarzm","followers_url":"https://api.github.com/users/malarzm/followers","following_url":"https://api.github.com/users/malarzm/following{/other_user}","gists_url":"https://api.github.com/users/malarzm/gists{/gist_id}","starred_url":"https://api.github.com/users/malarzm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malarzm/subscriptions","organizations_url":"https://api.github.com/users/malarzm/orgs","repos_url":"https://api.github.com/users/malarzm/repos","events_url":"https://api.github.com/users/malarzm/events{/privacy}","received_events_url":"https://api.github.com/users/malarzm/received_events","type":"User","site_admin":false},"body":"Putting new instance of `$model` is rather unexpected as underlying modifiers et al will work on empty `$model` instead of edited one, no? Offhand `new $class` is very optimistic assumption that can easily break if ctor has required arguments - `https://github.com/doctrine/instantiator` helps in such situations.","created_at":"2016-11-20T11:21:06Z","updated_at":"2016-11-20T11:21:06Z","html_url":"https://github.com/codete/FormGeneratorBundle/pull/13#discussion_r88798898","pull_request_url":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/comments/88798898"},"html":{"href":"https://github.com/codete/FormGeneratorBundle/pull/13#discussion_r88798898"},"pull_request":{"href":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/13","id":59563503,"html_url":"https://github.com/codete/FormGeneratorBundle/pull/13","diff_url":"https://github.com/codete/FormGeneratorBundle/pull/13.diff","patch_url":"https://github.com/codete/FormGeneratorBundle/pull/13.patch","issue_url":"https://api.github.com/repos/codete/FormGeneratorBundle/issues/13","number":13,"state":"open","locked":false,"title":"Embed forms","user":{"login":"KrzysztofMoskalik","id":9136446,"avatar_url":"https://avatars.githubusercontent.com/u/9136446?v=3","gravatar_id":"","url":"https://api.github.com/users/KrzysztofMoskalik","html_url":"https://github.com/KrzysztofMoskalik","followers_url":"https://api.github.com/users/KrzysztofMoskalik/followers","following_url":"https://api.github.com/users/KrzysztofMoskalik/following{/other_user}","gists_url":"https://api.github.com/users/KrzysztofMoskalik/gists{/gist_id}","starred_url":"https://api.github.com/users/KrzysztofMoskalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrzysztofMoskalik/subscriptions","organizations_url":"https://api.github.com/users/KrzysztofMoskalik/orgs","repos_url":"https://api.github.com/users/KrzysztofMoskalik/repos","events_url":"https://api.github.com/users/KrzysztofMoskalik/events{/privacy}","received_events_url":"https://api.github.com/users/KrzysztofMoskalik/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-16T22:15:15Z","updated_at":"2016-11-20T11:21:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63ad05283e8549abed60d2cd266adbef7aff9293","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/13/commits","review_comments_url":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/13/comments","review_comment_url":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codete/FormGeneratorBundle/issues/13/comments","statuses_url":"https://api.github.com/repos/codete/FormGeneratorBundle/statuses/e27665bec83c8d77311904d290f3213d9657d279","head":{"label":"KrzysztofMoskalik:embed-forms","ref":"embed-forms","sha":"e27665bec83c8d77311904d290f3213d9657d279","user":{"login":"KrzysztofMoskalik","id":9136446,"avatar_url":"https://avatars.githubusercontent.com/u/9136446?v=3","gravatar_id":"","url":"https://api.github.com/users/KrzysztofMoskalik","html_url":"https://github.com/KrzysztofMoskalik","followers_url":"https://api.github.com/users/KrzysztofMoskalik/followers","following_url":"https://api.github.com/users/KrzysztofMoskalik/following{/other_user}","gists_url":"https://api.github.com/users/KrzysztofMoskalik/gists{/gist_id}","starred_url":"https://api.github.com/users/KrzysztofMoskalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrzysztofMoskalik/subscriptions","organizations_url":"https://api.github.com/users/KrzysztofMoskalik/orgs","repos_url":"https://api.github.com/users/KrzysztofMoskalik/repos","events_url":"https://api.github.com/users/KrzysztofMoskalik/events{/privacy}","received_events_url":"https://api.github.com/users/KrzysztofMoskalik/received_events","type":"User","site_admin":false},"repo":{"id":50804219,"name":"FormGeneratorBundle","full_name":"KrzysztofMoskalik/FormGeneratorBundle","owner":{"login":"KrzysztofMoskalik","id":9136446,"avatar_url":"https://avatars.githubusercontent.com/u/9136446?v=3","gravatar_id":"","url":"https://api.github.com/users/KrzysztofMoskalik","html_url":"https://github.com/KrzysztofMoskalik","followers_url":"https://api.github.com/users/KrzysztofMoskalik/followers","following_url":"https://api.github.com/users/KrzysztofMoskalik/following{/other_user}","gists_url":"https://api.github.com/users/KrzysztofMoskalik/gists{/gist_id}","starred_url":"https://api.github.com/users/KrzysztofMoskalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrzysztofMoskalik/subscriptions","organizations_url":"https://api.github.com/users/KrzysztofMoskalik/orgs","repos_url":"https://api.github.com/users/KrzysztofMoskalik/repos","events_url":"https://api.github.com/users/KrzysztofMoskalik/events{/privacy}","received_events_url":"https://api.github.com/users/KrzysztofMoskalik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KrzysztofMoskalik/FormGeneratorBundle","description":"Symfony2 Bundle for dynamic Form generation","fork":true,"url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle","forks_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/forks","keys_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/teams","hooks_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/hooks","issue_events_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/issues/events{/number}","events_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/events","assignees_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/assignees{/user}","branches_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/branches{/branch}","tags_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/tags","blobs_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/languages","stargazers_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/stargazers","contributors_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/contributors","subscribers_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/subscribers","subscription_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/subscription","commits_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/contents/{+path}","compare_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/merges","archive_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/downloads","issues_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/issues{/number}","pulls_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/labels{/name}","releases_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/releases{/id}","deployments_url":"https://api.github.com/repos/KrzysztofMoskalik/FormGeneratorBundle/deployments","created_at":"2016-02-01T00:57:19Z","updated_at":"2016-02-01T00:57:21Z","pushed_at":"2016-11-08T22:11:02Z","git_url":"git://github.com/KrzysztofMoskalik/FormGeneratorBundle.git","ssh_url":"git@github.com:KrzysztofMoskalik/FormGeneratorBundle.git","clone_url":"https://github.com/KrzysztofMoskalik/FormGeneratorBundle.git","svn_url":"https://github.com/KrzysztofMoskalik/FormGeneratorBundle","homepage":null,"size":45,"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":"codete:master","ref":"master","sha":"cf06a457a6bfc84d0d0ca8a906d873ac0b6f38fc","user":{"login":"codete","id":984393,"avatar_url":"https://avatars.githubusercontent.com/u/984393?v=3","gravatar_id":"","url":"https://api.github.com/users/codete","html_url":"https://github.com/codete","followers_url":"https://api.github.com/users/codete/followers","following_url":"https://api.github.com/users/codete/following{/other_user}","gists_url":"https://api.github.com/users/codete/gists{/gist_id}","starred_url":"https://api.github.com/users/codete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codete/subscriptions","organizations_url":"https://api.github.com/users/codete/orgs","repos_url":"https://api.github.com/users/codete/repos","events_url":"https://api.github.com/users/codete/events{/privacy}","received_events_url":"https://api.github.com/users/codete/received_events","type":"Organization","site_admin":false},"repo":{"id":30537690,"name":"FormGeneratorBundle","full_name":"codete/FormGeneratorBundle","owner":{"login":"codete","id":984393,"avatar_url":"https://avatars.githubusercontent.com/u/984393?v=3","gravatar_id":"","url":"https://api.github.com/users/codete","html_url":"https://github.com/codete","followers_url":"https://api.github.com/users/codete/followers","following_url":"https://api.github.com/users/codete/following{/other_user}","gists_url":"https://api.github.com/users/codete/gists{/gist_id}","starred_url":"https://api.github.com/users/codete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codete/subscriptions","organizations_url":"https://api.github.com/users/codete/orgs","repos_url":"https://api.github.com/users/codete/repos","events_url":"https://api.github.com/users/codete/events{/privacy}","received_events_url":"https://api.github.com/users/codete/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codete/FormGeneratorBundle","description":"Symfony2 Bundle for dynamic Form generation","fork":false,"url":"https://api.github.com/repos/codete/FormGeneratorBundle","forks_url":"https://api.github.com/repos/codete/FormGeneratorBundle/forks","keys_url":"https://api.github.com/repos/codete/FormGeneratorBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codete/FormGeneratorBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codete/FormGeneratorBundle/teams","hooks_url":"https://api.github.com/repos/codete/FormGeneratorBundle/hooks","issue_events_url":"https://api.github.com/repos/codete/FormGeneratorBundle/issues/events{/number}","events_url":"https://api.github.com/repos/codete/FormGeneratorBundle/events","assignees_url":"https://api.github.com/repos/codete/FormGeneratorBundle/assignees{/user}","branches_url":"https://api.github.com/repos/codete/FormGeneratorBundle/branches{/branch}","tags_url":"https://api.github.com/repos/codete/FormGeneratorBundle/tags","blobs_url":"https://api.github.com/repos/codete/FormGeneratorBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codete/FormGeneratorBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codete/FormGeneratorBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/codete/FormGeneratorBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codete/FormGeneratorBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/codete/FormGeneratorBundle/languages","stargazers_url":"https://api.github.com/repos/codete/FormGeneratorBundle/stargazers","contributors_url":"https://api.github.com/repos/codete/FormGeneratorBundle/contributors","subscribers_url":"https://api.github.com/repos/codete/FormGeneratorBundle/subscribers","subscription_url":"https://api.github.com/repos/codete/FormGeneratorBundle/subscription","commits_url":"https://api.github.com/repos/codete/FormGeneratorBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/codete/FormGeneratorBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/codete/FormGeneratorBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/codete/FormGeneratorBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/codete/FormGeneratorBundle/contents/{+path}","compare_url":"https://api.github.com/repos/codete/FormGeneratorBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codete/FormGeneratorBundle/merges","archive_url":"https://api.github.com/repos/codete/FormGeneratorBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codete/FormGeneratorBundle/downloads","issues_url":"https://api.github.com/repos/codete/FormGeneratorBundle/issues{/number}","pulls_url":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/codete/FormGeneratorBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/codete/FormGeneratorBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codete/FormGeneratorBundle/labels{/name}","releases_url":"https://api.github.com/repos/codete/FormGeneratorBundle/releases{/id}","deployments_url":"https://api.github.com/repos/codete/FormGeneratorBundle/deployments","created_at":"2015-02-09T13:44:58Z","updated_at":"2016-10-27T19:36:16Z","pushed_at":"2016-11-08T22:11:03Z","git_url":"git://github.com/codete/FormGeneratorBundle.git","ssh_url":"git@github.com:codete/FormGeneratorBundle.git","clone_url":"https://github.com/codete/FormGeneratorBundle.git","svn_url":"https://github.com/codete/FormGeneratorBundle","homepage":null,"size":39,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/13"},"html":{"href":"https://github.com/codete/FormGeneratorBundle/pull/13"},"issue":{"href":"https://api.github.com/repos/codete/FormGeneratorBundle/issues/13"},"comments":{"href":"https://api.github.com/repos/codete/FormGeneratorBundle/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codete/FormGeneratorBundle/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/codete/FormGeneratorBundle/statuses/e27665bec83c8d77311904d290f3213d9657d279"}}}}
{"actor":{"display_login":"malarzm"}}