{"action":"created","comment":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/58447401","id":58447401,"diff_hunk":"@@ -0,0 +1,115 @@\n+<?php\n+\n+namespace JavierEguiluz\\Bundle\\EasyAdminBundle\\Form\\Type;\n+\n+use Doctrine\\Common\\Collections\\Collection;\n+use Symfony\\Component\\Form\\AbstractType;\n+use Symfony\\Component\\Form\\FormBuilderInterface;\n+use Symfony\\Component\\Form\\FormEvent;\n+use Symfony\\Component\\Form\\FormEvents;\n+use Symfony\\Component\\OptionsResolver\\OptionsResolver;\n+use Symfony\\Component\\OptionsResolver\\OptionsResolverInterface;\n+\n+/**\n+ * Autocomplete form type.\n+ *\n+ * @author Javier Eguiluz <javier.eguiluz@gmail.com>\n+ * @author Yonel Ceruto <yonelceruto@gmail.com>\n+ */\n+class EasyAdminAutocompleteType extends AbstractType\n+{\n+    private $preSetData = false;\n+    private $preSubmit = false;","path":"Form/Type/EasyAdminAutocompleteType.php","position":22,"original_position":22,"commit_id":"e50b74286a8171481cfa17047e07aebd01f66340","original_commit_id":"e50b74286a8171481cfa17047e07aebd01f66340","user":{"login":"ogizanagi","id":2211145,"avatar_url":"https://avatars.githubusercontent.com/u/2211145?v=3","gravatar_id":"","url":"https://api.github.com/users/ogizanagi","html_url":"https://github.com/ogizanagi","followers_url":"https://api.github.com/users/ogizanagi/followers","following_url":"https://api.github.com/users/ogizanagi/following{/other_user}","gists_url":"https://api.github.com/users/ogizanagi/gists{/gist_id}","starred_url":"https://api.github.com/users/ogizanagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogizanagi/subscriptions","organizations_url":"https://api.github.com/users/ogizanagi/orgs","repos_url":"https://api.github.com/users/ogizanagi/repos","events_url":"https://api.github.com/users/ogizanagi/events{/privacy}","received_events_url":"https://api.github.com/users/ogizanagi/received_events","type":"User","site_admin":false},"body":"I'm really not convinced about this. A form type should not be stateful, as it can live in the container as a single instance. This might lead to edge cases when having this form type as a service.","created_at":"2016-04-04T20:56:25Z","updated_at":"2016-04-04T20:56:25Z","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/1071#discussion_r58447401","pull_request_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/1071","_links":{"self":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/58447401"},"html":{"href":"https://github.com/javiereguiluz/EasyAdminBundle/pull/1071#discussion_r58447401"},"pull_request":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/1071"}}},"pull_request":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/1071","id":65156101,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/1071","diff_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/1071.diff","patch_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/1071.patch","issue_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1071","number":1071,"state":"open","locked":false,"title":"Add an autocomplete field","user":{"login":"yceruto","id":2028198,"avatar_url":"https://avatars.githubusercontent.com/u/2028198?v=3","gravatar_id":"","url":"https://api.github.com/users/yceruto","html_url":"https://github.com/yceruto","followers_url":"https://api.github.com/users/yceruto/followers","following_url":"https://api.github.com/users/yceruto/following{/other_user}","gists_url":"https://api.github.com/users/yceruto/gists{/gist_id}","starred_url":"https://api.github.com/users/yceruto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yceruto/subscriptions","organizations_url":"https://api.github.com/users/yceruto/orgs","repos_url":"https://api.github.com/users/yceruto/repos","events_url":"https://api.github.com/users/yceruto/events{/privacy}","received_events_url":"https://api.github.com/users/yceruto/received_events","type":"User","site_admin":false},"body":"This PR is a continuation of #1066 \r\n\r\n- [X] Clicking on the autocomplete field makes an HTTP request, even if you don't type anything\r\n- [x] Initially no value is displayed (although the field stores a value in the database)\r\n- [x] Submitting the form gives you a This value is not valid error.\r\n- [X] Support to `::TO_MANY` relationship.","created_at":"2016-04-04T14:40:33Z","updated_at":"2016-04-04T20:56:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eef69eccff38bb1a2f1018f788ecf4c5c9dd047b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/1071/commits","review_comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/1071/comments","review_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1071/comments","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/e50b74286a8171481cfa17047e07aebd01f66340","head":{"label":"yceruto:fix_1043_continue","ref":"fix_1043_continue","sha":"e50b74286a8171481cfa17047e07aebd01f66340","user":{"login":"yceruto","id":2028198,"avatar_url":"https://avatars.githubusercontent.com/u/2028198?v=3","gravatar_id":"","url":"https://api.github.com/users/yceruto","html_url":"https://github.com/yceruto","followers_url":"https://api.github.com/users/yceruto/followers","following_url":"https://api.github.com/users/yceruto/following{/other_user}","gists_url":"https://api.github.com/users/yceruto/gists{/gist_id}","starred_url":"https://api.github.com/users/yceruto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yceruto/subscriptions","organizations_url":"https://api.github.com/users/yceruto/orgs","repos_url":"https://api.github.com/users/yceruto/repos","events_url":"https://api.github.com/users/yceruto/events{/privacy}","received_events_url":"https://api.github.com/users/yceruto/received_events","type":"User","site_admin":false},"repo":{"id":52987793,"name":"EasyAdminBundle","full_name":"yceruto/EasyAdminBundle","owner":{"login":"yceruto","id":2028198,"avatar_url":"https://avatars.githubusercontent.com/u/2028198?v=3","gravatar_id":"","url":"https://api.github.com/users/yceruto","html_url":"https://github.com/yceruto","followers_url":"https://api.github.com/users/yceruto/followers","following_url":"https://api.github.com/users/yceruto/following{/other_user}","gists_url":"https://api.github.com/users/yceruto/gists{/gist_id}","starred_url":"https://api.github.com/users/yceruto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yceruto/subscriptions","organizations_url":"https://api.github.com/users/yceruto/orgs","repos_url":"https://api.github.com/users/yceruto/repos","events_url":"https://api.github.com/users/yceruto/events{/privacy}","received_events_url":"https://api.github.com/users/yceruto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yceruto/EasyAdminBundle","description":"The new (and simple) admin generator for Symfony applications.","fork":true,"url":"https://api.github.com/repos/yceruto/EasyAdminBundle","forks_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/forks","keys_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/teams","hooks_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/events","assignees_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/tags","blobs_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/languages","stargazers_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/subscription","commits_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/merges","archive_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/downloads","issues_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/releases{/id}","deployments_url":"https://api.github.com/repos/yceruto/EasyAdminBundle/deployments","created_at":"2016-03-02T18:53:14Z","updated_at":"2016-03-02T18:53:20Z","pushed_at":"2016-04-04T20:08:19Z","git_url":"git://github.com/yceruto/EasyAdminBundle.git","ssh_url":"git@github.com:yceruto/EasyAdminBundle.git","clone_url":"https://github.com/yceruto/EasyAdminBundle.git","svn_url":"https://github.com/yceruto/EasyAdminBundle","homepage":"","size":8044,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"javiereguiluz:master","ref":"master","sha":"975201f1c437885e26822e2caf1762eaf496b11e","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"repo":{"id":29126334,"name":"EasyAdminBundle","full_name":"javiereguiluz/EasyAdminBundle","owner":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle","description":"The new (and simple) admin generator for Symfony applications.","fork":false,"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle","forks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/forks","keys_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/teams","hooks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/events","assignees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/tags","blobs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/languages","stargazers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscription","commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/merges","archive_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/downloads","issues_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/releases{/id}","deployments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/deployments","created_at":"2015-01-12T08:43:02Z","updated_at":"2016-04-04T16:58:58Z","pushed_at":"2016-04-04T20:08:19Z","git_url":"git://github.com/javiereguiluz/EasyAdminBundle.git","ssh_url":"git@github.com:javiereguiluz/EasyAdminBundle.git","clone_url":"https://github.com/javiereguiluz/EasyAdminBundle.git","svn_url":"https://github.com/javiereguiluz/EasyAdminBundle","homepage":"","size":12103,"stargazers_count":912,"watchers_count":912,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":154,"mirror_url":null,"open_issues_count":44,"forks":154,"open_issues":44,"watchers":912,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/1071"},"html":{"href":"https://github.com/javiereguiluz/EasyAdminBundle/pull/1071"},"issue":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1071"},"comments":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1071/comments"},"review_comments":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/1071/comments"},"review_comment":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/1071/commits"},"statuses":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/e50b74286a8171481cfa17047e07aebd01f66340"}}}}