{"action":"created","comment":{"url":"https://api.github.com/repos/imbo/imbo/pulls/comments/189820165","pull_request_review_id":122070372,"id":189820165,"diff_hunk":"@@ -335,6 +335,75 @@ public function testCanGetLastModifiedDate(array $images, array $users, $imageId\n         }\n     }\n \n+    /**\n+     * @covers ::setLastModifiedNow\n+     */\n+    public function testCanSetLastModifiedDateToNow() {\n+        $user = 'user';\n+        $imageIdentifier = 'id';\n+\n+        $original = $this->getImage();\n+        $added = time() - 10;\n+        $original->setAddedDate(new DateTime('@' . $added, new DateTimeZone('UTC')));\n+        $original->setUpdatedDate(new DateTime('@' . $added, new DateTimeZone('UTC')));\n+\n+        $this->assertTrue(\n+            $this->adapter->insertImage($user, $imageIdentifier, $original),\n+            'Could not insert image'\n+        );\n+\n+        $now = $this->adapter->setLastModifiedNow($user, $imageIdentifier);\n+        $this->assertEquals(time(), $now->getTimestamp(), 'Returned timestamp should be around now', 1);","path":"tests/phpunit/integration/Database/DatabaseTests.php","position":22,"original_position":22,"commit_id":"6c50dd47b004bd13f4f48f8c5368dec4cd193ff7","original_commit_id":"6c50dd47b004bd13f4f48f8c5368dec4cd193ff7","user":{"login":"fangel","id":19275,"avatar_url":"https://avatars3.githubusercontent.com/u/19275?v=4","gravatar_id":"","url":"https://api.github.com/users/fangel","html_url":"https://github.com/fangel","followers_url":"https://api.github.com/users/fangel/followers","following_url":"https://api.github.com/users/fangel/following{/other_user}","gists_url":"https://api.github.com/users/fangel/gists{/gist_id}","starred_url":"https://api.github.com/users/fangel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fangel/subscriptions","organizations_url":"https://api.github.com/users/fangel/orgs","repos_url":"https://api.github.com/users/fangel/repos","events_url":"https://api.github.com/users/fangel/events{/privacy}","received_events_url":"https://api.github.com/users/fangel/received_events","type":"User","site_admin":false},"body":"The 4'th parameter to the assert (`1`) is actually an allowed delta-parameter. So it already allows for clock-skews of up to one second between the call to `setLastModifiedNow` and the assert...","created_at":"2018-05-22T08:43:43Z","updated_at":"2018-05-22T08:43:43Z","html_url":"https://github.com/imbo/imbo/pull/598#discussion_r189820165","pull_request_url":"https://api.github.com/repos/imbo/imbo/pulls/598","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/imbo/imbo/pulls/comments/189820165"},"html":{"href":"https://github.com/imbo/imbo/pull/598#discussion_r189820165"},"pull_request":{"href":"https://api.github.com/repos/imbo/imbo/pulls/598"}},"in_reply_to_id":189809325},"pull_request":{"url":"https://api.github.com/repos/imbo/imbo/pulls/598","id":188798301,"html_url":"https://github.com/imbo/imbo/pull/598","diff_url":"https://github.com/imbo/imbo/pull/598.diff","patch_url":"https://github.com/imbo/imbo/pull/598.patch","issue_url":"https://api.github.com/repos/imbo/imbo/issues/598","number":598,"state":"open","locked":false,"title":"Added methods to update last-modified timestamp to DB interface","user":{"login":"fangel","id":19275,"avatar_url":"https://avatars3.githubusercontent.com/u/19275?v=4","gravatar_id":"","url":"https://api.github.com/users/fangel","html_url":"https://github.com/fangel","followers_url":"https://api.github.com/users/fangel/followers","following_url":"https://api.github.com/users/fangel/following{/other_user}","gists_url":"https://api.github.com/users/fangel/gists{/gist_id}","starred_url":"https://api.github.com/users/fangel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fangel/subscriptions","organizations_url":"https://api.github.com/users/fangel/orgs","repos_url":"https://api.github.com/users/fangel/repos","events_url":"https://api.github.com/users/fangel/events{/privacy}","received_events_url":"https://api.github.com/users/fangel/received_events","type":"User","site_admin":false},"body":"This moves the responsibility for updating the last-modified timestamp away from the update-metadata functionality,\r\nand makes it into an explicit action performed by the database-operations event-listener\r\n\r\nThis is in reference to #530, where the behaviour between the Doctrine and Mongo implementation were different.","created_at":"2018-05-17T16:45:56Z","updated_at":"2018-05-22T08:43:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9013c0f9baeb8e35f4c4dc4692cfd43ac1af05ac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/imbo/imbo/pulls/598/commits","review_comments_url":"https://api.github.com/repos/imbo/imbo/pulls/598/comments","review_comment_url":"https://api.github.com/repos/imbo/imbo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/imbo/imbo/issues/598/comments","statuses_url":"https://api.github.com/repos/imbo/imbo/statuses/6c50dd47b004bd13f4f48f8c5368dec4cd193ff7","head":{"label":"tv2:update_modified_timestamp_refactor","ref":"update_modified_timestamp_refactor","sha":"6c50dd47b004bd13f4f48f8c5368dec4cd193ff7","user":{"login":"tv2","id":1555698,"avatar_url":"https://avatars3.githubusercontent.com/u/1555698?v=4","gravatar_id":"","url":"https://api.github.com/users/tv2","html_url":"https://github.com/tv2","followers_url":"https://api.github.com/users/tv2/followers","following_url":"https://api.github.com/users/tv2/following{/other_user}","gists_url":"https://api.github.com/users/tv2/gists{/gist_id}","starred_url":"https://api.github.com/users/tv2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tv2/subscriptions","organizations_url":"https://api.github.com/users/tv2/orgs","repos_url":"https://api.github.com/users/tv2/repos","events_url":"https://api.github.com/users/tv2/events{/privacy}","received_events_url":"https://api.github.com/users/tv2/received_events","type":"Organization","site_admin":false},"repo":{"id":26526219,"name":"imbo","full_name":"tv2/imbo","owner":{"login":"tv2","id":1555698,"avatar_url":"https://avatars3.githubusercontent.com/u/1555698?v=4","gravatar_id":"","url":"https://api.github.com/users/tv2","html_url":"https://github.com/tv2","followers_url":"https://api.github.com/users/tv2/followers","following_url":"https://api.github.com/users/tv2/following{/other_user}","gists_url":"https://api.github.com/users/tv2/gists{/gist_id}","starred_url":"https://api.github.com/users/tv2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tv2/subscriptions","organizations_url":"https://api.github.com/users/tv2/orgs","repos_url":"https://api.github.com/users/tv2/repos","events_url":"https://api.github.com/users/tv2/events{/privacy}","received_events_url":"https://api.github.com/users/tv2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tv2/imbo","description":"Imbo is an image \"server\" that can be used to add/get/delete images using a RESTful interface.","fork":true,"url":"https://api.github.com/repos/tv2/imbo","forks_url":"https://api.github.com/repos/tv2/imbo/forks","keys_url":"https://api.github.com/repos/tv2/imbo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tv2/imbo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tv2/imbo/teams","hooks_url":"https://api.github.com/repos/tv2/imbo/hooks","issue_events_url":"https://api.github.com/repos/tv2/imbo/issues/events{/number}","events_url":"https://api.github.com/repos/tv2/imbo/events","assignees_url":"https://api.github.com/repos/tv2/imbo/assignees{/user}","branches_url":"https://api.github.com/repos/tv2/imbo/branches{/branch}","tags_url":"https://api.github.com/repos/tv2/imbo/tags","blobs_url":"https://api.github.com/repos/tv2/imbo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tv2/imbo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tv2/imbo/git/refs{/sha}","trees_url":"https://api.github.com/repos/tv2/imbo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tv2/imbo/statuses/{sha}","languages_url":"https://api.github.com/repos/tv2/imbo/languages","stargazers_url":"https://api.github.com/repos/tv2/imbo/stargazers","contributors_url":"https://api.github.com/repos/tv2/imbo/contributors","subscribers_url":"https://api.github.com/repos/tv2/imbo/subscribers","subscription_url":"https://api.github.com/repos/tv2/imbo/subscription","commits_url":"https://api.github.com/repos/tv2/imbo/commits{/sha}","git_commits_url":"https://api.github.com/repos/tv2/imbo/git/commits{/sha}","comments_url":"https://api.github.com/repos/tv2/imbo/comments{/number}","issue_comment_url":"https://api.github.com/repos/tv2/imbo/issues/comments{/number}","contents_url":"https://api.github.com/repos/tv2/imbo/contents/{+path}","compare_url":"https://api.github.com/repos/tv2/imbo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tv2/imbo/merges","archive_url":"https://api.github.com/repos/tv2/imbo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tv2/imbo/downloads","issues_url":"https://api.github.com/repos/tv2/imbo/issues{/number}","pulls_url":"https://api.github.com/repos/tv2/imbo/pulls{/number}","milestones_url":"https://api.github.com/repos/tv2/imbo/milestones{/number}","notifications_url":"https://api.github.com/repos/tv2/imbo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tv2/imbo/labels{/name}","releases_url":"https://api.github.com/repos/tv2/imbo/releases{/id}","deployments_url":"https://api.github.com/repos/tv2/imbo/deployments","created_at":"2014-11-12T08:24:10Z","updated_at":"2018-05-14T17:44:18Z","pushed_at":"2018-05-17T16:45:12Z","git_url":"git://github.com/tv2/imbo.git","ssh_url":"git@github.com:tv2/imbo.git","clone_url":"https://github.com/tv2/imbo.git","svn_url":"https://github.com/tv2/imbo","homepage":"http://imbo.io/","size":10818,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"imbo:develop","ref":"develop","sha":"ffa6ab9d15f7ddf5811736e1fe2eecff5eb9985d","user":{"login":"imbo","id":1469132,"avatar_url":"https://avatars2.githubusercontent.com/u/1469132?v=4","gravatar_id":"","url":"https://api.github.com/users/imbo","html_url":"https://github.com/imbo","followers_url":"https://api.github.com/users/imbo/followers","following_url":"https://api.github.com/users/imbo/following{/other_user}","gists_url":"https://api.github.com/users/imbo/gists{/gist_id}","starred_url":"https://api.github.com/users/imbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imbo/subscriptions","organizations_url":"https://api.github.com/users/imbo/orgs","repos_url":"https://api.github.com/users/imbo/repos","events_url":"https://api.github.com/users/imbo/events{/privacy}","received_events_url":"https://api.github.com/users/imbo/received_events","type":"Organization","site_admin":false},"repo":{"id":1415087,"name":"imbo","full_name":"imbo/imbo","owner":{"login":"imbo","id":1469132,"avatar_url":"https://avatars2.githubusercontent.com/u/1469132?v=4","gravatar_id":"","url":"https://api.github.com/users/imbo","html_url":"https://github.com/imbo","followers_url":"https://api.github.com/users/imbo/followers","following_url":"https://api.github.com/users/imbo/following{/other_user}","gists_url":"https://api.github.com/users/imbo/gists{/gist_id}","starred_url":"https://api.github.com/users/imbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imbo/subscriptions","organizations_url":"https://api.github.com/users/imbo/orgs","repos_url":"https://api.github.com/users/imbo/repos","events_url":"https://api.github.com/users/imbo/events{/privacy}","received_events_url":"https://api.github.com/users/imbo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/imbo/imbo","description":"Imbo is an image \"server\" that can be used to add/get/delete images using a RESTful interface.","fork":false,"url":"https://api.github.com/repos/imbo/imbo","forks_url":"https://api.github.com/repos/imbo/imbo/forks","keys_url":"https://api.github.com/repos/imbo/imbo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imbo/imbo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imbo/imbo/teams","hooks_url":"https://api.github.com/repos/imbo/imbo/hooks","issue_events_url":"https://api.github.com/repos/imbo/imbo/issues/events{/number}","events_url":"https://api.github.com/repos/imbo/imbo/events","assignees_url":"https://api.github.com/repos/imbo/imbo/assignees{/user}","branches_url":"https://api.github.com/repos/imbo/imbo/branches{/branch}","tags_url":"https://api.github.com/repos/imbo/imbo/tags","blobs_url":"https://api.github.com/repos/imbo/imbo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imbo/imbo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imbo/imbo/git/refs{/sha}","trees_url":"https://api.github.com/repos/imbo/imbo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imbo/imbo/statuses/{sha}","languages_url":"https://api.github.com/repos/imbo/imbo/languages","stargazers_url":"https://api.github.com/repos/imbo/imbo/stargazers","contributors_url":"https://api.github.com/repos/imbo/imbo/contributors","subscribers_url":"https://api.github.com/repos/imbo/imbo/subscribers","subscription_url":"https://api.github.com/repos/imbo/imbo/subscription","commits_url":"https://api.github.com/repos/imbo/imbo/commits{/sha}","git_commits_url":"https://api.github.com/repos/imbo/imbo/git/commits{/sha}","comments_url":"https://api.github.com/repos/imbo/imbo/comments{/number}","issue_comment_url":"https://api.github.com/repos/imbo/imbo/issues/comments{/number}","contents_url":"https://api.github.com/repos/imbo/imbo/contents/{+path}","compare_url":"https://api.github.com/repos/imbo/imbo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imbo/imbo/merges","archive_url":"https://api.github.com/repos/imbo/imbo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imbo/imbo/downloads","issues_url":"https://api.github.com/repos/imbo/imbo/issues{/number}","pulls_url":"https://api.github.com/repos/imbo/imbo/pulls{/number}","milestones_url":"https://api.github.com/repos/imbo/imbo/milestones{/number}","notifications_url":"https://api.github.com/repos/imbo/imbo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imbo/imbo/labels{/name}","releases_url":"https://api.github.com/repos/imbo/imbo/releases{/id}","deployments_url":"https://api.github.com/repos/imbo/imbo/deployments","created_at":"2011-02-26T16:23:03Z","updated_at":"2018-05-07T10:36:58Z","pushed_at":"2018-05-17T16:45:57Z","git_url":"git://github.com/imbo/imbo.git","ssh_url":"git@github.com:imbo/imbo.git","clone_url":"https://github.com/imbo/imbo.git","svn_url":"https://github.com/imbo/imbo","homepage":"http://imbo.io/","size":10925,"stargazers_count":271,"watchers_count":271,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":45,"mirror_url":null,"archived":false,"open_issues_count":49,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":45,"open_issues":49,"watchers":271,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/imbo/imbo/pulls/598"},"html":{"href":"https://github.com/imbo/imbo/pull/598"},"issue":{"href":"https://api.github.com/repos/imbo/imbo/issues/598"},"comments":{"href":"https://api.github.com/repos/imbo/imbo/issues/598/comments"},"review_comments":{"href":"https://api.github.com/repos/imbo/imbo/pulls/598/comments"},"review_comment":{"href":"https://api.github.com/repos/imbo/imbo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/imbo/imbo/pulls/598/commits"},"statuses":{"href":"https://api.github.com/repos/imbo/imbo/statuses/6c50dd47b004bd13f4f48f8c5368dec4cd193ff7"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"fangel"}}