{"action":"created","comment":{"url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/comments/65162695","id":65162695,"diff_hunk":"@@ -40,13 +38,17 @@ public function createPasswordToken(UserInterface $user, \\DateTime $expiresAt =\n     {\n         /** @var AbstractPasswordToken $passwordToken */\n         $passwordToken = new $this->passwordTokenClass();\n-        $passwordToken->setToken(md5(time()));\n+\n+        $factory = new Factory();\n+        $generator = $factory->getGenerator(new Strength(Strength::MEDIUM));\n+\n+        $passwordToken->setToken($generator->generateString(50, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'));\n         $passwordToken->setUser($user);\n-        $passwordToken->setExpiresAt($expiresAt instanceof \\DateTime ? $expiresAt : new \\DateTime($expiresAt));\n+        $passwordToken->setExpiresAt($expiresAt ?: new \\DateTime('+1 day')); // TODO: make the default expire time configurable","path":"Manager/PasswordTokenManager.php","position":50,"original_position":50,"commit_id":"a3f8d82da46e5a3ebb9d782a336d63b3ae35a630","original_commit_id":"a3f8d82da46e5a3ebb9d782a336d63b3ae35a630","user":{"login":"vincentchalamon","id":407859,"avatar_url":"https://avatars.githubusercontent.com/u/407859?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentchalamon","html_url":"https://github.com/vincentchalamon","followers_url":"https://api.github.com/users/vincentchalamon/followers","following_url":"https://api.github.com/users/vincentchalamon/following{/other_user}","gists_url":"https://api.github.com/users/vincentchalamon/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentchalamon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentchalamon/subscriptions","organizations_url":"https://api.github.com/users/vincentchalamon/orgs","repos_url":"https://api.github.com/users/vincentchalamon/repos","events_url":"https://api.github.com/users/vincentchalamon/events{/privacy}","received_events_url":"https://api.github.com/users/vincentchalamon/received_events","type":"User","site_admin":false},"body":"But insight recommends `source code should not contain TODO comments`","created_at":"2016-05-31T11:08:43Z","updated_at":"2016-05-31T11:08:43Z","html_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle/pull/11#discussion_r65162695","pull_request_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/comments/65162695"},"html":{"href":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle/pull/11#discussion_r65162695"},"pull_request":{"href":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/11","id":71941200,"html_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle/pull/11","diff_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle/pull/11.diff","patch_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle/pull/11.patch","issue_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues/11","number":11,"state":"open","locked":false,"title":"Improve bundle design and quality","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":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | #5 \r\n| License       | MIT\r\n\r\n* [x] Remove dependency to SensioFrameworkExtra (and use XML for routing)\r\n* [x] Use XML for services\r\n* [x] Use a **crypto safe** source for the token generator\r\n* [x] Fix MVC violations\r\n* [ ] Remove hard dependency to Doctrine ORM\r\n* [ ] Remove dependency to DoctrineExtensionsBundle","created_at":"2016-05-30T22:14:47Z","updated_at":"2016-05-31T11:08:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41712193afe766fdbd60a5e8a1221d0e6ad93f2f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/11/commits","review_comments_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/11/comments","review_comment_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues/11/comments","statuses_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/statuses/a3f8d82da46e5a3ebb9d782a336d63b3ae35a630","head":{"label":"coopTilleuls:remove_sensio_extra","ref":"remove_sensio_extra","sha":"a3f8d82da46e5a3ebb9d782a336d63b3ae35a630","user":{"login":"coopTilleuls","id":1161198,"avatar_url":"https://avatars.githubusercontent.com/u/1161198?v=3","gravatar_id":"","url":"https://api.github.com/users/coopTilleuls","html_url":"https://github.com/coopTilleuls","followers_url":"https://api.github.com/users/coopTilleuls/followers","following_url":"https://api.github.com/users/coopTilleuls/following{/other_user}","gists_url":"https://api.github.com/users/coopTilleuls/gists{/gist_id}","starred_url":"https://api.github.com/users/coopTilleuls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coopTilleuls/subscriptions","organizations_url":"https://api.github.com/users/coopTilleuls/orgs","repos_url":"https://api.github.com/users/coopTilleuls/repos","events_url":"https://api.github.com/users/coopTilleuls/events{/privacy}","received_events_url":"https://api.github.com/users/coopTilleuls/received_events","type":"Organization","site_admin":false},"repo":{"id":59833894,"name":"CoopTilleulsForgotPasswordBundle","full_name":"coopTilleuls/CoopTilleulsForgotPasswordBundle","owner":{"login":"coopTilleuls","id":1161198,"avatar_url":"https://avatars.githubusercontent.com/u/1161198?v=3","gravatar_id":"","url":"https://api.github.com/users/coopTilleuls","html_url":"https://github.com/coopTilleuls","followers_url":"https://api.github.com/users/coopTilleuls/followers","following_url":"https://api.github.com/users/coopTilleuls/following{/other_user}","gists_url":"https://api.github.com/users/coopTilleuls/gists{/gist_id}","starred_url":"https://api.github.com/users/coopTilleuls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coopTilleuls/subscriptions","organizations_url":"https://api.github.com/users/coopTilleuls/orgs","repos_url":"https://api.github.com/users/coopTilleuls/repos","events_url":"https://api.github.com/users/coopTilleuls/events{/privacy}","received_events_url":"https://api.github.com/users/coopTilleuls/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle","description":"Provides a \"forgot password\" complete feature through a Symfony2 bundle","fork":false,"url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle","forks_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/forks","keys_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/teams","hooks_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/hooks","issue_events_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues/events{/number}","events_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/events","assignees_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/assignees{/user}","branches_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/branches{/branch}","tags_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/tags","blobs_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/languages","stargazers_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/stargazers","contributors_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/contributors","subscribers_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/subscribers","subscription_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/subscription","commits_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/contents/{+path}","compare_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/merges","archive_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/downloads","issues_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues{/number}","pulls_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/labels{/name}","releases_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/releases{/id}","deployments_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/deployments","created_at":"2016-05-27T12:47:31Z","updated_at":"2016-05-31T08:26:20Z","pushed_at":"2016-05-31T07:55:48Z","git_url":"git://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle.git","ssh_url":"git@github.com:coopTilleuls/CoopTilleulsForgotPasswordBundle.git","clone_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle.git","svn_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle","homepage":null,"size":62,"stargazers_count":8,"watchers_count":8,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":8,"default_branch":"master"}},"base":{"label":"coopTilleuls:master","ref":"master","sha":"d23fa823e176d3698ed3f6fc5d4318f626c17c2d","user":{"login":"coopTilleuls","id":1161198,"avatar_url":"https://avatars.githubusercontent.com/u/1161198?v=3","gravatar_id":"","url":"https://api.github.com/users/coopTilleuls","html_url":"https://github.com/coopTilleuls","followers_url":"https://api.github.com/users/coopTilleuls/followers","following_url":"https://api.github.com/users/coopTilleuls/following{/other_user}","gists_url":"https://api.github.com/users/coopTilleuls/gists{/gist_id}","starred_url":"https://api.github.com/users/coopTilleuls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coopTilleuls/subscriptions","organizations_url":"https://api.github.com/users/coopTilleuls/orgs","repos_url":"https://api.github.com/users/coopTilleuls/repos","events_url":"https://api.github.com/users/coopTilleuls/events{/privacy}","received_events_url":"https://api.github.com/users/coopTilleuls/received_events","type":"Organization","site_admin":false},"repo":{"id":59833894,"name":"CoopTilleulsForgotPasswordBundle","full_name":"coopTilleuls/CoopTilleulsForgotPasswordBundle","owner":{"login":"coopTilleuls","id":1161198,"avatar_url":"https://avatars.githubusercontent.com/u/1161198?v=3","gravatar_id":"","url":"https://api.github.com/users/coopTilleuls","html_url":"https://github.com/coopTilleuls","followers_url":"https://api.github.com/users/coopTilleuls/followers","following_url":"https://api.github.com/users/coopTilleuls/following{/other_user}","gists_url":"https://api.github.com/users/coopTilleuls/gists{/gist_id}","starred_url":"https://api.github.com/users/coopTilleuls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coopTilleuls/subscriptions","organizations_url":"https://api.github.com/users/coopTilleuls/orgs","repos_url":"https://api.github.com/users/coopTilleuls/repos","events_url":"https://api.github.com/users/coopTilleuls/events{/privacy}","received_events_url":"https://api.github.com/users/coopTilleuls/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle","description":"Provides a \"forgot password\" complete feature through a Symfony2 bundle","fork":false,"url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle","forks_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/forks","keys_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/teams","hooks_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/hooks","issue_events_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues/events{/number}","events_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/events","assignees_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/assignees{/user}","branches_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/branches{/branch}","tags_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/tags","blobs_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/languages","stargazers_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/stargazers","contributors_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/contributors","subscribers_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/subscribers","subscription_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/subscription","commits_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/contents/{+path}","compare_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/merges","archive_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/downloads","issues_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues{/number}","pulls_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/labels{/name}","releases_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/releases{/id}","deployments_url":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/deployments","created_at":"2016-05-27T12:47:31Z","updated_at":"2016-05-31T08:26:20Z","pushed_at":"2016-05-31T07:55:48Z","git_url":"git://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle.git","ssh_url":"git@github.com:coopTilleuls/CoopTilleulsForgotPasswordBundle.git","clone_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle.git","svn_url":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle","homepage":null,"size":62,"stargazers_count":8,"watchers_count":8,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/11"},"html":{"href":"https://github.com/coopTilleuls/CoopTilleulsForgotPasswordBundle/pull/11"},"issue":{"href":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues/11"},"comments":{"href":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/coopTilleuls/CoopTilleulsForgotPasswordBundle/statuses/a3f8d82da46e5a3ebb9d782a336d63b3ae35a630"}}}}
{"actor":{"display_login":"vincentchalamon"}}