{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/73790192","id":73790192,"diff_hunk":"@@ -188,6 +188,39 @@ public function getBoolean($key, $default = false)\n     }\n \n     /**\n+     * Returns the parameter value converted to a DateTime object.\n+     *\n+     * @param string                    $key      The parameter key\n+     * @param string                    $format   The expected date format\n+     * @param \\DateTimeInterface|string $default  The default value to be converted to a DateTime object if the parameter key does not exist\n+     * @param \\DateTimeZone|null        $timeZone A DateTimeZone object representing the desired time zone\n+     *\n+     * @return \\DateTimeInterface|null\n+     */\n+    public function getDate($key, $format, $default = null, \\DateTimeZone $timeZone = null)\n+    {\n+        $time = $this->get($key, $default);\n+\n+        if ($time instanceof \\DateTimeInterface) {","path":"src/Symfony/Component/HttpFoundation/ParameterBag.php","position":17,"original_position":17,"commit_id":"969b4bafbed8185adee1acf537e3d61cc8b0d14b","original_commit_id":"969b4bafbed8185adee1acf537e3d61cc8b0d14b","user":{"login":"ro0NL","id":1047696,"avatar_url":"https://avatars.githubusercontent.com/u/1047696?v=3","gravatar_id":"","url":"https://api.github.com/users/ro0NL","html_url":"https://github.com/ro0NL","followers_url":"https://api.github.com/users/ro0NL/followers","following_url":"https://api.github.com/users/ro0NL/following{/other_user}","gists_url":"https://api.github.com/users/ro0NL/gists{/gist_id}","starred_url":"https://api.github.com/users/ro0NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ro0NL/subscriptions","organizations_url":"https://api.github.com/users/ro0NL/orgs","repos_url":"https://api.github.com/users/ro0NL/repos","events_url":"https://api.github.com/users/ro0NL/events{/privacy}","received_events_url":"https://api.github.com/users/ro0NL/received_events","type":"User","site_admin":false},"body":"Shouldnt this check for `null` (the default value) also?","created_at":"2016-08-06T18:53:04Z","updated_at":"2016-08-06T18:53:04Z","html_url":"https://github.com/symfony/symfony/pull/19296#discussion_r73790192","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/19296","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/73790192"},"html":{"href":"https://github.com/symfony/symfony/pull/19296#discussion_r73790192"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19296"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/19296","id":76346022,"html_url":"https://github.com/symfony/symfony/pull/19296","diff_url":"https://github.com/symfony/symfony/pull/19296.diff","patch_url":"https://github.com/symfony/symfony/pull/19296.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/19296","number":19296,"state":"open","locked":false,"title":"[HttpFoundation] adds getDate method to the ParameterBag class","user":{"login":"maldoinc","id":1253062,"avatar_url":"https://avatars.githubusercontent.com/u/1253062?v=3","gravatar_id":"","url":"https://api.github.com/users/maldoinc","html_url":"https://github.com/maldoinc","followers_url":"https://api.github.com/users/maldoinc/followers","following_url":"https://api.github.com/users/maldoinc/following{/other_user}","gists_url":"https://api.github.com/users/maldoinc/gists{/gist_id}","starred_url":"https://api.github.com/users/maldoinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maldoinc/subscriptions","organizations_url":"https://api.github.com/users/maldoinc/orgs","repos_url":"https://api.github.com/users/maldoinc/repos","events_url":"https://api.github.com/users/maldoinc/events{/privacy}","received_events_url":"https://api.github.com/users/maldoinc/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       |master\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | \r\n| License       | MIT\r\n| Doc PR        | [#6718](https://github.com/symfony/symfony-docs/pull/6718)\r\n\r\nThis adds a `getDate` method to the `ParameterBag` class which convert the specified key to a `DateTime` object\r\n\r\n**Edit**: The main motivation behind this PR (from my PoV at least) is to avoid repetitive tasks with handling date parameters on GET requests.\r\n\r\n---\r\nThis is a continuation of #19295. Moved here in order to have a cleaner git history.","created_at":"2016-07-05T21:27:31Z","updated_at":"2016-08-06T18:53:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0907522215647407feb88fbd3bf5b2e887d3af78","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/19296/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/19296/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/19296/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/969b4bafbed8185adee1acf537e3d61cc8b0d14b","head":{"label":"maldoinc:parameterbag-getdate","ref":"parameterbag-getdate","sha":"969b4bafbed8185adee1acf537e3d61cc8b0d14b","user":{"login":"maldoinc","id":1253062,"avatar_url":"https://avatars.githubusercontent.com/u/1253062?v=3","gravatar_id":"","url":"https://api.github.com/users/maldoinc","html_url":"https://github.com/maldoinc","followers_url":"https://api.github.com/users/maldoinc/followers","following_url":"https://api.github.com/users/maldoinc/following{/other_user}","gists_url":"https://api.github.com/users/maldoinc/gists{/gist_id}","starred_url":"https://api.github.com/users/maldoinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maldoinc/subscriptions","organizations_url":"https://api.github.com/users/maldoinc/orgs","repos_url":"https://api.github.com/users/maldoinc/repos","events_url":"https://api.github.com/users/maldoinc/events{/privacy}","received_events_url":"https://api.github.com/users/maldoinc/received_events","type":"User","site_admin":false},"repo":{"id":62633390,"name":"symfony","full_name":"maldoinc/symfony","owner":{"login":"maldoinc","id":1253062,"avatar_url":"https://avatars.githubusercontent.com/u/1253062?v=3","gravatar_id":"","url":"https://api.github.com/users/maldoinc","html_url":"https://github.com/maldoinc","followers_url":"https://api.github.com/users/maldoinc/followers","following_url":"https://api.github.com/users/maldoinc/following{/other_user}","gists_url":"https://api.github.com/users/maldoinc/gists{/gist_id}","starred_url":"https://api.github.com/users/maldoinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maldoinc/subscriptions","organizations_url":"https://api.github.com/users/maldoinc/orgs","repos_url":"https://api.github.com/users/maldoinc/repos","events_url":"https://api.github.com/users/maldoinc/events{/privacy}","received_events_url":"https://api.github.com/users/maldoinc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maldoinc/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/maldoinc/symfony","forks_url":"https://api.github.com/repos/maldoinc/symfony/forks","keys_url":"https://api.github.com/repos/maldoinc/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maldoinc/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maldoinc/symfony/teams","hooks_url":"https://api.github.com/repos/maldoinc/symfony/hooks","issue_events_url":"https://api.github.com/repos/maldoinc/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/maldoinc/symfony/events","assignees_url":"https://api.github.com/repos/maldoinc/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/maldoinc/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/maldoinc/symfony/tags","blobs_url":"https://api.github.com/repos/maldoinc/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maldoinc/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maldoinc/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/maldoinc/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maldoinc/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/maldoinc/symfony/languages","stargazers_url":"https://api.github.com/repos/maldoinc/symfony/stargazers","contributors_url":"https://api.github.com/repos/maldoinc/symfony/contributors","subscribers_url":"https://api.github.com/repos/maldoinc/symfony/subscribers","subscription_url":"https://api.github.com/repos/maldoinc/symfony/subscription","commits_url":"https://api.github.com/repos/maldoinc/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/maldoinc/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/maldoinc/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/maldoinc/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/maldoinc/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/maldoinc/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maldoinc/symfony/merges","archive_url":"https://api.github.com/repos/maldoinc/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maldoinc/symfony/downloads","issues_url":"https://api.github.com/repos/maldoinc/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/maldoinc/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/maldoinc/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/maldoinc/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maldoinc/symfony/labels{/name}","releases_url":"https://api.github.com/repos/maldoinc/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/maldoinc/symfony/deployments","created_at":"2016-07-05T12:01:31Z","updated_at":"2016-07-05T12:01:49Z","pushed_at":"2016-07-29T18:51:44Z","git_url":"git://github.com/maldoinc/symfony.git","ssh_url":"git@github.com:maldoinc/symfony.git","clone_url":"https://github.com/maldoinc/symfony.git","svn_url":"https://github.com/maldoinc/symfony","homepage":"symfony.com","size":68590,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"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":"symfony:master","ref":"master","sha":"5213778822c70445decd51286427b42fb7c6e17b","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":458058,"name":"symfony","full_name":"symfony/symfony","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony","description":"The Symfony PHP framework","fork":false,"url":"https://api.github.com/repos/symfony/symfony","forks_url":"https://api.github.com/repos/symfony/symfony/forks","keys_url":"https://api.github.com/repos/symfony/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony/teams","hooks_url":"https://api.github.com/repos/symfony/symfony/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony/events","assignees_url":"https://api.github.com/repos/symfony/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony/tags","blobs_url":"https://api.github.com/repos/symfony/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony/subscription","commits_url":"https://api.github.com/repos/symfony/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony/merges","archive_url":"https://api.github.com/repos/symfony/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony/downloads","issues_url":"https://api.github.com/repos/symfony/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/symfony/symfony/deployments","created_at":"2010-01-04T14:21:21Z","updated_at":"2016-08-06T01:35:53Z","pushed_at":"2016-08-06T16:07:24Z","git_url":"git://github.com/symfony/symfony.git","ssh_url":"git@github.com:symfony/symfony.git","clone_url":"https://github.com/symfony/symfony.git","svn_url":"https://github.com/symfony/symfony","homepage":"symfony.com","size":133520,"stargazers_count":12738,"watchers_count":12738,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":4967,"mirror_url":null,"open_issues_count":728,"forks":4967,"open_issues":728,"watchers":12738,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19296"},"html":{"href":"https://github.com/symfony/symfony/pull/19296"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/19296"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/19296/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19296/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19296/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/969b4bafbed8185adee1acf537e3d61cc8b0d14b"}}}}
{"actor":{"display_login":"ro0NL"}}