{"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/190870381","pull_request_review_id":123341770,"id":190870381,"diff_hunk":"@@ -0,0 +1,116 @@\n+<?php\n+\n+/**\n+ * This file is part of the eZ Publish Kernel package.\n+ *\n+ * @copyright Copyright (C) eZ Systems AS. All rights reserved.\n+ * @license For full copyright and license information view LICENSE file distributed with this source code.\n+ */\n+namespace eZ\\Bundle\\EzPublishCoreBundle\\Command;\n+\n+use eZ\\Publish\\API\\Repository\\Repository;\n+use Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\n+use Symfony\\Component\\Console\\Input\\InputArgument;\n+use Symfony\\Component\\Console\\Input\\InputInterface;\n+use Symfony\\Component\\Console\\Input\\InputOption;\n+use Symfony\\Component\\Console\\Output\\OutputInterface;\n+use eZ\\Publish\\API\\Repository\\TrashService;\n+\n+/**\n+ * Console Command which empties eZ Publish trash.\n+ */\n+class TrashPurgeCommand extends ContainerAwareCommand\n+{\n+    /**\n+     * @var \\eZ\\Publish\\API\\Repository\\Repository\n+     */\n+    private $repository;\n+\n+    /** @var TrashService */\n+    private $trashService;\n+\n+    /**\n+     * @var \\Symfony\\Component\\Console\\Input\\InputInterface\n+     */\n+    private $input;\n+    /**\n+     * @var \\Doctrine\\DBAL\\Connection\n+     */\n+    private $connection;\n+\n+    /**\n+     * @var \\Symfony\\Component\\Console\\Output\\OutputInterface\n+     */\n+    private $output;\n+\n+    /**\n+     * Database handler.\n+     *\n+     * @var \\eZ\\Publish\\Core\\Persistence\\Database\\DatabaseHandler\n+     */\n+    protected $handler;\n+\n+    public function __construct(Repository $repository)\n+    {\n+        parent::__construct(null);\n+        $this->repository = $repository;\n+        $this->trashService = $this->repository->getTrashService();\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    protected function configure()\n+    {\n+        $this\n+            ->setName('ezplatform:trash-purge')\n+            ->addArgument('trashed', InputArgument::OPTIONAL, 'If set, only objects that has been trashed for at least the specified amount of days will be purged.')\n+            ->addOption(\n+                'user',\n+                'u',\n+                InputOption::VALUE_OPTIONAL,\n+                'eZ Platform username (with Role containing at least Content policies: read, versionread, edit, remove, versionremove)',\n+                'admin'\n+            )\n+            ->setDescription('Empty eZ Publish trash. Permanently deletes all objects in the trash.');","path":"eZ/Bundle/EzPublishCoreBundle/Command/TrashPurgeCommand.php","position":75,"original_position":75,"commit_id":"03889ad345099d86dff9dc76cd0d3445b794a18c","original_commit_id":"03889ad345099d86dff9dc76cd0d3445b794a18c","user":{"login":"glye","id":289744,"avatar_url":"https://avatars1.githubusercontent.com/u/289744?v=4","gravatar_id":"","url":"https://api.github.com/users/glye","html_url":"https://github.com/glye","followers_url":"https://api.github.com/users/glye/followers","following_url":"https://api.github.com/users/glye/following{/other_user}","gists_url":"https://api.github.com/users/glye/gists{/gist_id}","starred_url":"https://api.github.com/users/glye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glye/subscriptions","organizations_url":"https://api.github.com/users/glye/orgs","repos_url":"https://api.github.com/users/glye/repos","events_url":"https://api.github.com/users/glye/events{/privacy}","received_events_url":"https://api.github.com/users/glye/received_events","type":"User","site_admin":false},"body":"Not necessarily \"all\" anymore. Should be amended to explain that.","created_at":"2018-05-25T11:52:50Z","updated_at":"2018-05-25T11:54:24Z","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2261#discussion_r190870381","pull_request_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2261","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/190870381"},"html":{"href":"https://github.com/ezsystems/ezpublish-kernel/pull/2261#discussion_r190870381"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2261"}}},"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2261","id":171783705,"html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2261","diff_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2261.diff","patch_url":"https://github.com/ezsystems/ezpublish-kernel/pull/2261.patch","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2261","number":2261,"state":"open","locked":false,"title":"Add a field to support \"date object was trashed\"","user":{"login":"thiagocamposviana","id":353112,"avatar_url":"https://avatars1.githubusercontent.com/u/353112?v=4","gravatar_id":"","url":"https://api.github.com/users/thiagocamposviana","html_url":"https://github.com/thiagocamposviana","followers_url":"https://api.github.com/users/thiagocamposviana/followers","following_url":"https://api.github.com/users/thiagocamposviana/following{/other_user}","gists_url":"https://api.github.com/users/thiagocamposviana/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagocamposviana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagocamposviana/subscriptions","organizations_url":"https://api.github.com/users/thiagocamposviana/orgs","repos_url":"https://api.github.com/users/thiagocamposviana/repos","events_url":"https://api.github.com/users/thiagocamposviana/events{/privacy}","received_events_url":"https://api.github.com/users/thiagocamposviana/received_events","type":"User","site_admin":false},"body":"https://jira.ez.no/browse/EZP-28881\r\n\r\nSee also https://github.com/ezsystems/ezpublish-legacy/pull/1351\r\n\r\nThe eZ Publish trash can really fill and make it difficult to find something in the trash. It would be nice to be able to have a script that periodically clears out items that are older than \"n days\" (for example). In order to do this, we would need a field for objects in the trash that saves the \"date object was trashed\". It has been often requested by clients.\r\n\r\nThis pull request makes the changes from the ez publish legacy repository compatible with the ezpublish kernel.\r\n\r\nTODO:  It is necessary to add the SQL update to the sql update file, I can do that once eZ provides direction on where to put them.","created_at":"2018-02-27T21:04:13Z","updated_at":"2018-05-25T11:54:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9b7670a26248169f97263c460bdafc21387436d","assignee":{"login":"alongosz","id":7099219,"avatar_url":"https://avatars1.githubusercontent.com/u/7099219?v=4","gravatar_id":"","url":"https://api.github.com/users/alongosz","html_url":"https://github.com/alongosz","followers_url":"https://api.github.com/users/alongosz/followers","following_url":"https://api.github.com/users/alongosz/following{/other_user}","gists_url":"https://api.github.com/users/alongosz/gists{/gist_id}","starred_url":"https://api.github.com/users/alongosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alongosz/subscriptions","organizations_url":"https://api.github.com/users/alongosz/orgs","repos_url":"https://api.github.com/users/alongosz/repos","events_url":"https://api.github.com/users/alongosz/events{/privacy}","received_events_url":"https://api.github.com/users/alongosz/received_events","type":"User","site_admin":false},"assignees":[{"login":"alongosz","id":7099219,"avatar_url":"https://avatars1.githubusercontent.com/u/7099219?v=4","gravatar_id":"","url":"https://api.github.com/users/alongosz","html_url":"https://github.com/alongosz","followers_url":"https://api.github.com/users/alongosz/followers","following_url":"https://api.github.com/users/alongosz/following{/other_user}","gists_url":"https://api.github.com/users/alongosz/gists{/gist_id}","starred_url":"https://api.github.com/users/alongosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alongosz/subscriptions","organizations_url":"https://api.github.com/users/alongosz/orgs","repos_url":"https://api.github.com/users/alongosz/repos","events_url":"https://api.github.com/users/alongosz/events{/privacy}","received_events_url":"https://api.github.com/users/alongosz/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2261/commits","review_comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2261/comments","review_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2261/comments","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/03889ad345099d86dff9dc76cd0d3445b794a18c","head":{"label":"thiagocamposviana:master","ref":"master","sha":"03889ad345099d86dff9dc76cd0d3445b794a18c","user":{"login":"thiagocamposviana","id":353112,"avatar_url":"https://avatars1.githubusercontent.com/u/353112?v=4","gravatar_id":"","url":"https://api.github.com/users/thiagocamposviana","html_url":"https://github.com/thiagocamposviana","followers_url":"https://api.github.com/users/thiagocamposviana/followers","following_url":"https://api.github.com/users/thiagocamposviana/following{/other_user}","gists_url":"https://api.github.com/users/thiagocamposviana/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagocamposviana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagocamposviana/subscriptions","organizations_url":"https://api.github.com/users/thiagocamposviana/orgs","repos_url":"https://api.github.com/users/thiagocamposviana/repos","events_url":"https://api.github.com/users/thiagocamposviana/events{/privacy}","received_events_url":"https://api.github.com/users/thiagocamposviana/received_events","type":"User","site_admin":false},"repo":{"id":123187132,"name":"ezpublish-kernel","full_name":"thiagocamposviana/ezpublish-kernel","owner":{"login":"thiagocamposviana","id":353112,"avatar_url":"https://avatars1.githubusercontent.com/u/353112?v=4","gravatar_id":"","url":"https://api.github.com/users/thiagocamposviana","html_url":"https://github.com/thiagocamposviana","followers_url":"https://api.github.com/users/thiagocamposviana/followers","following_url":"https://api.github.com/users/thiagocamposviana/following{/other_user}","gists_url":"https://api.github.com/users/thiagocamposviana/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagocamposviana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagocamposviana/subscriptions","organizations_url":"https://api.github.com/users/thiagocamposviana/orgs","repos_url":"https://api.github.com/users/thiagocamposviana/repos","events_url":"https://api.github.com/users/thiagocamposviana/events{/privacy}","received_events_url":"https://api.github.com/users/thiagocamposviana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thiagocamposviana/ezpublish-kernel","description":"Kernel (Repository, MVC layer, REST) for eZ Platform","fork":true,"url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel","forks_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/forks","keys_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/teams","hooks_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/hooks","issue_events_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/events","assignees_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/tags","blobs_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/languages","stargazers_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/stargazers","contributors_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/contributors","subscribers_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/subscribers","subscription_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/subscription","commits_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/merges","archive_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/downloads","issues_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/labels{/name}","releases_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/releases{/id}","deployments_url":"https://api.github.com/repos/thiagocamposviana/ezpublish-kernel/deployments","created_at":"2018-02-27T20:52:28Z","updated_at":"2018-05-11T22:47:25Z","pushed_at":"2018-05-23T19:20:59Z","git_url":"git://github.com/thiagocamposviana/ezpublish-kernel.git","ssh_url":"git@github.com:thiagocamposviana/ezpublish-kernel.git","clone_url":"https://github.com/thiagocamposviana/ezpublish-kernel.git","svn_url":"https://github.com/thiagocamposviana/ezpublish-kernel","homepage":"http://ezplatform.com/","size":51015,"stargazers_count":0,"watchers_count":0,"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":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ezsystems:master","ref":"master","sha":"11a0e99dd7196560336b30d3c7f6cd1ec667cd32","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars1.githubusercontent.com/u/295311?v=4","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":1663890,"name":"ezpublish-kernel","full_name":"ezsystems/ezpublish-kernel","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars1.githubusercontent.com/u/295311?v=4","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/ezpublish-kernel","description":"Kernel (Repository, MVC layer, REST) for eZ Platform","fork":false,"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel","forks_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/forks","keys_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/teams","hooks_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/events","assignees_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/tags","blobs_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/languages","stargazers_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/subscription","commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/merges","archive_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/downloads","issues_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/releases{/id}","deployments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/deployments","created_at":"2011-04-26T08:54:24Z","updated_at":"2018-05-25T06:24:49Z","pushed_at":"2018-05-25T07:22:12Z","git_url":"git://github.com/ezsystems/ezpublish-kernel.git","ssh_url":"git@github.com:ezsystems/ezpublish-kernel.git","clone_url":"https://github.com/ezsystems/ezpublish-kernel.git","svn_url":"https://github.com/ezsystems/ezpublish-kernel","homepage":"http://ezplatform.com/","size":51194,"stargazers_count":145,"watchers_count":145,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":195,"mirror_url":null,"archived":false,"open_issues_count":84,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":195,"open_issues":84,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2261"},"html":{"href":"https://github.com/ezsystems/ezpublish-kernel/pull/2261"},"issue":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2261"},"comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/2261/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2261/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/2261/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/03889ad345099d86dff9dc76cd0d3445b794a18c"}},"author_association":"NONE"}}
{"actor":{"display_login":"glye"}}