{"action":"created","comment":{"url":"https://api.github.com/repos/php-http/plugins/pulls/comments/58010379","id":58010379,"diff_hunk":"@@ -109,11 +110,11 @@ private function createCookie(RequestInterface $request, $setCookie)\n \n             switch (strtolower($key)) {\n                 case 'expires':\n-                    $expires = \\DateTime::createFromFormat(DATE_COOKIE, $value);\n+                    $expires = \\DateTime::createFromFormat(\\DateTime::COOKIE, $value);","path":"src/CookiePlugin.php","position":15,"original_position":15,"commit_id":"8a91a72370d7b5d80a5c6847d877b68bf5aa9e13","original_commit_id":"8a91a72370d7b5d80a5c6847d877b68bf5aa9e13","user":{"login":"dbu","id":76576,"avatar_url":"https://avatars.githubusercontent.com/u/76576?v=3","gravatar_id":"","url":"https://api.github.com/users/dbu","html_url":"https://github.com/dbu","followers_url":"https://api.github.com/users/dbu/followers","following_url":"https://api.github.com/users/dbu/following{/other_user}","gists_url":"https://api.github.com/users/dbu/gists{/gist_id}","starred_url":"https://api.github.com/users/dbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbu/subscriptions","organizations_url":"https://api.github.com/users/dbu/orgs","repos_url":"https://api.github.com/users/dbu/repos","events_url":"https://api.github.com/users/dbu/events{/privacy}","received_events_url":"https://api.github.com/users/dbu/received_events","type":"User","site_admin":false},"body":"looking at the test failure on hhvm, i wonder if hhvm can't handle dates that far in the future? \r\n\r\nwhich in turn leads me to think we should check the return value as [\\DateTime::createFromFormat](http://php.net/manual/en/datetime.createfromformat.php) is one of those stupid functions that returns false instead of throwing an exception on failure. if we check for `false === $expires` we can throw an exception and put the $value in the message to say it was not converted to a date.","created_at":"2016-03-31T07:24:15Z","updated_at":"2016-03-31T07:24:15Z","html_url":"https://github.com/php-http/plugins/pull/68#discussion_r58010379","pull_request_url":"https://api.github.com/repos/php-http/plugins/pulls/68","_links":{"self":{"href":"https://api.github.com/repos/php-http/plugins/pulls/comments/58010379"},"html":{"href":"https://github.com/php-http/plugins/pull/68#discussion_r58010379"},"pull_request":{"href":"https://api.github.com/repos/php-http/plugins/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/php-http/plugins/pulls/68","id":63342528,"html_url":"https://github.com/php-http/plugins/pull/68","diff_url":"https://github.com/php-http/plugins/pull/68.diff","patch_url":"https://github.com/php-http/plugins/pull/68.patch","issue_url":"https://api.github.com/repos/php-http/plugins/issues/68","number":68,"state":"open","locked":false,"title":"Fix #67 Fixed Cookie creation in cookie plugin.","user":{"login":"Bouwdie","id":133619,"avatar_url":"https://avatars.githubusercontent.com/u/133619?v=3","gravatar_id":"","url":"https://api.github.com/users/Bouwdie","html_url":"https://github.com/Bouwdie","followers_url":"https://api.github.com/users/Bouwdie/followers","following_url":"https://api.github.com/users/Bouwdie/following{/other_user}","gists_url":"https://api.github.com/users/Bouwdie/gists{/gist_id}","starred_url":"https://api.github.com/users/Bouwdie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bouwdie/subscriptions","organizations_url":"https://api.github.com/users/Bouwdie/orgs","repos_url":"https://api.github.com/users/Bouwdie/repos","events_url":"https://api.github.com/users/Bouwdie/events{/privacy}","received_events_url":"https://api.github.com/users/Bouwdie/received_events","type":"User","site_admin":false},"body":"fix #67\r\n\r\nFix applied by calculating the expireIn (max-age) seconds instead of expire datetime.\r\nExpanded save spec by using a more complete cookie.\r\n\r\nUse DATE_COOKIE constant instead of DateTime constant.\r\nExpand the cookie header content with all parts.","created_at":"2016-03-18T08:40:36Z","updated_at":"2016-03-31T07:24:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e62fb3b7d8a723b33e9d1468d5d73ee0cba84adf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/php-http/plugins/pulls/68/commits","review_comments_url":"https://api.github.com/repos/php-http/plugins/pulls/68/comments","review_comment_url":"https://api.github.com/repos/php-http/plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/php-http/plugins/issues/68/comments","statuses_url":"https://api.github.com/repos/php-http/plugins/statuses/8a91a72370d7b5d80a5c6847d877b68bf5aa9e13","head":{"label":"Bouwdie:master","ref":"master","sha":"8a91a72370d7b5d80a5c6847d877b68bf5aa9e13","user":{"login":"Bouwdie","id":133619,"avatar_url":"https://avatars.githubusercontent.com/u/133619?v=3","gravatar_id":"","url":"https://api.github.com/users/Bouwdie","html_url":"https://github.com/Bouwdie","followers_url":"https://api.github.com/users/Bouwdie/followers","following_url":"https://api.github.com/users/Bouwdie/following{/other_user}","gists_url":"https://api.github.com/users/Bouwdie/gists{/gist_id}","starred_url":"https://api.github.com/users/Bouwdie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bouwdie/subscriptions","organizations_url":"https://api.github.com/users/Bouwdie/orgs","repos_url":"https://api.github.com/users/Bouwdie/repos","events_url":"https://api.github.com/users/Bouwdie/events{/privacy}","received_events_url":"https://api.github.com/users/Bouwdie/received_events","type":"User","site_admin":false},"repo":{"id":54140420,"name":"plugins","full_name":"Bouwdie/plugins","owner":{"login":"Bouwdie","id":133619,"avatar_url":"https://avatars.githubusercontent.com/u/133619?v=3","gravatar_id":"","url":"https://api.github.com/users/Bouwdie","html_url":"https://github.com/Bouwdie","followers_url":"https://api.github.com/users/Bouwdie/followers","following_url":"https://api.github.com/users/Bouwdie/following{/other_user}","gists_url":"https://api.github.com/users/Bouwdie/gists{/gist_id}","starred_url":"https://api.github.com/users/Bouwdie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bouwdie/subscriptions","organizations_url":"https://api.github.com/users/Bouwdie/orgs","repos_url":"https://api.github.com/users/Bouwdie/repos","events_url":"https://api.github.com/users/Bouwdie/events{/privacy}","received_events_url":"https://api.github.com/users/Bouwdie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Bouwdie/plugins","description":"Plugin client, decorate HTTP client with middlewares","fork":true,"url":"https://api.github.com/repos/Bouwdie/plugins","forks_url":"https://api.github.com/repos/Bouwdie/plugins/forks","keys_url":"https://api.github.com/repos/Bouwdie/plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bouwdie/plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bouwdie/plugins/teams","hooks_url":"https://api.github.com/repos/Bouwdie/plugins/hooks","issue_events_url":"https://api.github.com/repos/Bouwdie/plugins/issues/events{/number}","events_url":"https://api.github.com/repos/Bouwdie/plugins/events","assignees_url":"https://api.github.com/repos/Bouwdie/plugins/assignees{/user}","branches_url":"https://api.github.com/repos/Bouwdie/plugins/branches{/branch}","tags_url":"https://api.github.com/repos/Bouwdie/plugins/tags","blobs_url":"https://api.github.com/repos/Bouwdie/plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bouwdie/plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bouwdie/plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bouwdie/plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bouwdie/plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/Bouwdie/plugins/languages","stargazers_url":"https://api.github.com/repos/Bouwdie/plugins/stargazers","contributors_url":"https://api.github.com/repos/Bouwdie/plugins/contributors","subscribers_url":"https://api.github.com/repos/Bouwdie/plugins/subscribers","subscription_url":"https://api.github.com/repos/Bouwdie/plugins/subscription","commits_url":"https://api.github.com/repos/Bouwdie/plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bouwdie/plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bouwdie/plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bouwdie/plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bouwdie/plugins/contents/{+path}","compare_url":"https://api.github.com/repos/Bouwdie/plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bouwdie/plugins/merges","archive_url":"https://api.github.com/repos/Bouwdie/plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bouwdie/plugins/downloads","issues_url":"https://api.github.com/repos/Bouwdie/plugins/issues{/number}","pulls_url":"https://api.github.com/repos/Bouwdie/plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/Bouwdie/plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/Bouwdie/plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bouwdie/plugins/labels{/name}","releases_url":"https://api.github.com/repos/Bouwdie/plugins/releases{/id}","deployments_url":"https://api.github.com/repos/Bouwdie/plugins/deployments","created_at":"2016-03-17T18:04:22Z","updated_at":"2016-03-17T18:04:22Z","pushed_at":"2016-03-31T06:39:07Z","git_url":"git://github.com/Bouwdie/plugins.git","ssh_url":"git@github.com:Bouwdie/plugins.git","clone_url":"https://github.com/Bouwdie/plugins.git","svn_url":"https://github.com/Bouwdie/plugins","homepage":"http://httplug.io","size":96,"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":"php-http:master","ref":"master","sha":"741f0c42687f964831fdd7822d4bc45b7468bb21","user":{"login":"php-http","id":12104859,"avatar_url":"https://avatars.githubusercontent.com/u/12104859?v=3","gravatar_id":"","url":"https://api.github.com/users/php-http","html_url":"https://github.com/php-http","followers_url":"https://api.github.com/users/php-http/followers","following_url":"https://api.github.com/users/php-http/following{/other_user}","gists_url":"https://api.github.com/users/php-http/gists{/gist_id}","starred_url":"https://api.github.com/users/php-http/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-http/subscriptions","organizations_url":"https://api.github.com/users/php-http/orgs","repos_url":"https://api.github.com/users/php-http/repos","events_url":"https://api.github.com/users/php-http/events{/privacy}","received_events_url":"https://api.github.com/users/php-http/received_events","type":"Organization","site_admin":false},"repo":{"id":45717095,"name":"plugins","full_name":"php-http/plugins","owner":{"login":"php-http","id":12104859,"avatar_url":"https://avatars.githubusercontent.com/u/12104859?v=3","gravatar_id":"","url":"https://api.github.com/users/php-http","html_url":"https://github.com/php-http","followers_url":"https://api.github.com/users/php-http/followers","following_url":"https://api.github.com/users/php-http/following{/other_user}","gists_url":"https://api.github.com/users/php-http/gists{/gist_id}","starred_url":"https://api.github.com/users/php-http/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-http/subscriptions","organizations_url":"https://api.github.com/users/php-http/orgs","repos_url":"https://api.github.com/users/php-http/repos","events_url":"https://api.github.com/users/php-http/events{/privacy}","received_events_url":"https://api.github.com/users/php-http/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/php-http/plugins","description":"Plugin client, decorate HTTP client with middlewares","fork":false,"url":"https://api.github.com/repos/php-http/plugins","forks_url":"https://api.github.com/repos/php-http/plugins/forks","keys_url":"https://api.github.com/repos/php-http/plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/php-http/plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/php-http/plugins/teams","hooks_url":"https://api.github.com/repos/php-http/plugins/hooks","issue_events_url":"https://api.github.com/repos/php-http/plugins/issues/events{/number}","events_url":"https://api.github.com/repos/php-http/plugins/events","assignees_url":"https://api.github.com/repos/php-http/plugins/assignees{/user}","branches_url":"https://api.github.com/repos/php-http/plugins/branches{/branch}","tags_url":"https://api.github.com/repos/php-http/plugins/tags","blobs_url":"https://api.github.com/repos/php-http/plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/php-http/plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/php-http/plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/php-http/plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/php-http/plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/php-http/plugins/languages","stargazers_url":"https://api.github.com/repos/php-http/plugins/stargazers","contributors_url":"https://api.github.com/repos/php-http/plugins/contributors","subscribers_url":"https://api.github.com/repos/php-http/plugins/subscribers","subscription_url":"https://api.github.com/repos/php-http/plugins/subscription","commits_url":"https://api.github.com/repos/php-http/plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/php-http/plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/php-http/plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/php-http/plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/php-http/plugins/contents/{+path}","compare_url":"https://api.github.com/repos/php-http/plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/php-http/plugins/merges","archive_url":"https://api.github.com/repos/php-http/plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/php-http/plugins/downloads","issues_url":"https://api.github.com/repos/php-http/plugins/issues{/number}","pulls_url":"https://api.github.com/repos/php-http/plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/php-http/plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/php-http/plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/php-http/plugins/labels{/name}","releases_url":"https://api.github.com/repos/php-http/plugins/releases{/id}","deployments_url":"https://api.github.com/repos/php-http/plugins/deployments","created_at":"2015-11-07T01:13:49Z","updated_at":"2016-03-19T11:31:40Z","pushed_at":"2016-03-31T06:39:07Z","git_url":"git://github.com/php-http/plugins.git","ssh_url":"git@github.com:php-http/plugins.git","clone_url":"https://github.com/php-http/plugins.git","svn_url":"https://github.com/php-http/plugins","homepage":"http://httplug.io","size":117,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/php-http/plugins/pulls/68"},"html":{"href":"https://github.com/php-http/plugins/pull/68"},"issue":{"href":"https://api.github.com/repos/php-http/plugins/issues/68"},"comments":{"href":"https://api.github.com/repos/php-http/plugins/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/php-http/plugins/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/php-http/plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/php-http/plugins/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/php-http/plugins/statuses/8a91a72370d7b5d80a5c6847d877b68bf5aa9e13"}}}}