{"action":"created","comment":{"url":"https://api.github.com/repos/forkcms/forkcms/pulls/comments/169024650","pull_request_review_id":97483425,"id":169024650,"diff_hunk":"@@ -15,8 +17,12 @@ public function __construct(SpoonDatabase $database)\n         $this->database = $database;\n     }\n \n-    public function handle(CopyLocationWidgetsToOtherLocale $copyLocationWidgetsToOtherLocale): void\n+    public function handle(CopyModuleToOtherLocaleCommandInterface $command): void\n     {\n+        if (!$command instanceof CopyLocationWidgetsToOtherLocale) {\n+            throw new \\Exception('The class should be ' . CopyLocationWidgetsToOtherLocale::class);","path":"src/Backend/Modules/Location/Command/CopyLocationWidgetsToOtherLocaleHandler.php","position":null,"original_position":21,"commit_id":"1f9d40f4c0dff33381dd9166c55308ee4b416688","original_commit_id":"3c36a7e27501e02f5b855d9fc8777cb8343d90a3","user":{"login":"jeroendesloovere","id":588616,"avatar_url":"https://avatars1.githubusercontent.com/u/588616?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroendesloovere","html_url":"https://github.com/jeroendesloovere","followers_url":"https://api.github.com/users/jeroendesloovere/followers","following_url":"https://api.github.com/users/jeroendesloovere/following{/other_user}","gists_url":"https://api.github.com/users/jeroendesloovere/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroendesloovere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroendesloovere/subscriptions","organizations_url":"https://api.github.com/users/jeroendesloovere/orgs","repos_url":"https://api.github.com/users/jeroendesloovere/repos","events_url":"https://api.github.com/users/jeroendesloovere/events{/privacy}","received_events_url":"https://api.github.com/users/jeroendesloovere/received_events","type":"User","site_admin":false},"body":"Custom exception added","created_at":"2018-02-19T09:43:43Z","updated_at":"2018-02-19T09:43:43Z","html_url":"https://github.com/forkcms/forkcms/pull/2422#discussion_r169024650","pull_request_url":"https://api.github.com/repos/forkcms/forkcms/pulls/2422","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/comments/169024650"},"html":{"href":"https://github.com/forkcms/forkcms/pull/2422#discussion_r169024650"},"pull_request":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/2422"}},"in_reply_to_id":166915089},"pull_request":{"url":"https://api.github.com/repos/forkcms/forkcms/pulls/2422","id":166196060,"html_url":"https://github.com/forkcms/forkcms/pull/2422","diff_url":"https://github.com/forkcms/forkcms/pull/2422.diff","patch_url":"https://github.com/forkcms/forkcms/pull/2422.patch","issue_url":"https://api.github.com/repos/forkcms/forkcms/issues/2422","number":2422,"state":"open","locked":false,"title":"Core: Copy modules to other locale","user":{"login":"jeroendesloovere","id":588616,"avatar_url":"https://avatars1.githubusercontent.com/u/588616?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroendesloovere","html_url":"https://github.com/jeroendesloovere","followers_url":"https://api.github.com/users/jeroendesloovere/followers","following_url":"https://api.github.com/users/jeroendesloovere/following{/other_user}","gists_url":"https://api.github.com/users/jeroendesloovere/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroendesloovere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroendesloovere/subscriptions","organizations_url":"https://api.github.com/users/jeroendesloovere/orgs","repos_url":"https://api.github.com/users/jeroendesloovere/repos","events_url":"https://api.github.com/users/jeroendesloovere/events{/privacy}","received_events_url":"https://api.github.com/users/jeroendesloovere/received_events","type":"User","site_admin":false},"body":"## Type\r\n\r\n- Feature\r\n\r\n## Resolves the following issues\r\n<!-- List the hashes of the issues that this pull request resolves if their are issues for it. -->\r\n<!-- Use the following format: fixes #[issue_number] -->\r\n\r\nFixes https://github.com/forkcms/forkcms/issues/2092\r\n\r\n## Pull request description\r\n<!-- Describe what your pull request will fix / add / … -->\r\n\r\nSometimes you need to enable a new locale for a client `bin/console forkcms:locale:enable`, but you also have to duplicate all content to that new locale. This code provides the basics to connect every module, to a uniform copy($fromLocale, $toLocale).\r\n\r\n## How it works\r\n\r\nThe `ForkCMS\\Bundle\\CoreBundle\\Manager\\CopyModulesToOtherLocaleManager` is the core class that executes all copy-creating. \r\n\r\nYou can add your own `copy command` using:\r\n```yaml\r\nservices:\r\n    content_blocks.copy:\r\n        class: Backend\\Modules\\ContentBlocks\\Domain\\ContentBlock\\Command\\CopyContentBlocksToOtherLocale\r\n        tags:\r\n            - { name: fork.copy_module_to_other_locale }\r\n```\r\n> This will automatically be executed if somebody uses `bin/console forkcms:locale:copy` from the other PR https://github.com/forkcms/forkcms/pull/2423.\r\n\r\nThat `CopyContentBlocksToOtherLocale` extends `ForkCMS\\Component\\Module\\CopyModuleToOtherLocaleCommand`.\r\nIn the class you must have (since it is declared abstract):\r\n```php\r\n    public function getModuleName(): string\r\n    {\r\n        return 'ContentBlocks';\r\n    }\r\n```\r\n> You can also create a `__construct()` method where you can `$this->setPriority(50);` to be executed later. This allows us to first copy other modules and then you can use the new `id` or `extraId` in the Handler.\r\n\r\nThe Handler should implement `CopyModuleToOtherLocaleCommandHandlerInterface`.\r\nIn the handler class, `handle` method, you can set `id` (old -> new) and `extraId` (old -> new).\r\n\r\nModules changed:\r\n* ContentBlocks (priority is 10)\r\n* Location (priority is 10)\r\n* Pages (priority is 50)","created_at":"2018-01-31T08:41:25Z","updated_at":"2018-02-19T09:43:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad9d2f68b98c770a277380133d67f8e8d6b4a942","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":31503540,"url":"https://api.github.com/repos/forkcms/forkcms/labels/Feature","name":"Feature","color":"28E531","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/forkcms/forkcms/pulls/2422/commits","review_comments_url":"https://api.github.com/repos/forkcms/forkcms/pulls/2422/comments","review_comment_url":"https://api.github.com/repos/forkcms/forkcms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/forkcms/forkcms/issues/2422/comments","statuses_url":"https://api.github.com/repos/forkcms/forkcms/statuses/1f9d40f4c0dff33381dd9166c55308ee4b416688","head":{"label":"jeroendesloovere:copy-modules-to-other-locale","ref":"copy-modules-to-other-locale","sha":"1f9d40f4c0dff33381dd9166c55308ee4b416688","user":{"login":"jeroendesloovere","id":588616,"avatar_url":"https://avatars1.githubusercontent.com/u/588616?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroendesloovere","html_url":"https://github.com/jeroendesloovere","followers_url":"https://api.github.com/users/jeroendesloovere/followers","following_url":"https://api.github.com/users/jeroendesloovere/following{/other_user}","gists_url":"https://api.github.com/users/jeroendesloovere/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroendesloovere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroendesloovere/subscriptions","organizations_url":"https://api.github.com/users/jeroendesloovere/orgs","repos_url":"https://api.github.com/users/jeroendesloovere/repos","events_url":"https://api.github.com/users/jeroendesloovere/events{/privacy}","received_events_url":"https://api.github.com/users/jeroendesloovere/received_events","type":"User","site_admin":false},"repo":{"id":18802379,"name":"forkcms","full_name":"jeroendesloovere/forkcms","owner":{"login":"jeroendesloovere","id":588616,"avatar_url":"https://avatars1.githubusercontent.com/u/588616?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroendesloovere","html_url":"https://github.com/jeroendesloovere","followers_url":"https://api.github.com/users/jeroendesloovere/followers","following_url":"https://api.github.com/users/jeroendesloovere/following{/other_user}","gists_url":"https://api.github.com/users/jeroendesloovere/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroendesloovere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroendesloovere/subscriptions","organizations_url":"https://api.github.com/users/jeroendesloovere/orgs","repos_url":"https://api.github.com/users/jeroendesloovere/repos","events_url":"https://api.github.com/users/jeroendesloovere/events{/privacy}","received_events_url":"https://api.github.com/users/jeroendesloovere/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeroendesloovere/forkcms","description":"Fork is an open source CMS.","fork":true,"url":"https://api.github.com/repos/jeroendesloovere/forkcms","forks_url":"https://api.github.com/repos/jeroendesloovere/forkcms/forks","keys_url":"https://api.github.com/repos/jeroendesloovere/forkcms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeroendesloovere/forkcms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeroendesloovere/forkcms/teams","hooks_url":"https://api.github.com/repos/jeroendesloovere/forkcms/hooks","issue_events_url":"https://api.github.com/repos/jeroendesloovere/forkcms/issues/events{/number}","events_url":"https://api.github.com/repos/jeroendesloovere/forkcms/events","assignees_url":"https://api.github.com/repos/jeroendesloovere/forkcms/assignees{/user}","branches_url":"https://api.github.com/repos/jeroendesloovere/forkcms/branches{/branch}","tags_url":"https://api.github.com/repos/jeroendesloovere/forkcms/tags","blobs_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeroendesloovere/forkcms/statuses/{sha}","languages_url":"https://api.github.com/repos/jeroendesloovere/forkcms/languages","stargazers_url":"https://api.github.com/repos/jeroendesloovere/forkcms/stargazers","contributors_url":"https://api.github.com/repos/jeroendesloovere/forkcms/contributors","subscribers_url":"https://api.github.com/repos/jeroendesloovere/forkcms/subscribers","subscription_url":"https://api.github.com/repos/jeroendesloovere/forkcms/subscription","commits_url":"https://api.github.com/repos/jeroendesloovere/forkcms/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeroendesloovere/forkcms/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeroendesloovere/forkcms/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeroendesloovere/forkcms/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeroendesloovere/forkcms/contents/{+path}","compare_url":"https://api.github.com/repos/jeroendesloovere/forkcms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeroendesloovere/forkcms/merges","archive_url":"https://api.github.com/repos/jeroendesloovere/forkcms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeroendesloovere/forkcms/downloads","issues_url":"https://api.github.com/repos/jeroendesloovere/forkcms/issues{/number}","pulls_url":"https://api.github.com/repos/jeroendesloovere/forkcms/pulls{/number}","milestones_url":"https://api.github.com/repos/jeroendesloovere/forkcms/milestones{/number}","notifications_url":"https://api.github.com/repos/jeroendesloovere/forkcms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeroendesloovere/forkcms/labels{/name}","releases_url":"https://api.github.com/repos/jeroendesloovere/forkcms/releases{/id}","deployments_url":"https://api.github.com/repos/jeroendesloovere/forkcms/deployments","created_at":"2014-04-15T14:08:29Z","updated_at":"2016-10-24T08:33:48Z","pushed_at":"2018-02-19T08:53:30Z","git_url":"git://github.com/jeroendesloovere/forkcms.git","ssh_url":"git@github.com:jeroendesloovere/forkcms.git","clone_url":"https://github.com/jeroendesloovere/forkcms.git","svn_url":"https://github.com/jeroendesloovere/forkcms","homepage":"http://www.fork-cms.com","size":76346,"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":"master"}},"base":{"label":"forkcms:master","ref":"master","sha":"7c016c149cd3c774112a16d4432597e610ce2b16","user":{"login":"forkcms","id":312505,"avatar_url":"https://avatars1.githubusercontent.com/u/312505?v=4","gravatar_id":"","url":"https://api.github.com/users/forkcms","html_url":"https://github.com/forkcms","followers_url":"https://api.github.com/users/forkcms/followers","following_url":"https://api.github.com/users/forkcms/following{/other_user}","gists_url":"https://api.github.com/users/forkcms/gists{/gist_id}","starred_url":"https://api.github.com/users/forkcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkcms/subscriptions","organizations_url":"https://api.github.com/users/forkcms/orgs","repos_url":"https://api.github.com/users/forkcms/repos","events_url":"https://api.github.com/users/forkcms/events{/privacy}","received_events_url":"https://api.github.com/users/forkcms/received_events","type":"Organization","site_admin":false},"repo":{"id":1138583,"name":"forkcms","full_name":"forkcms/forkcms","owner":{"login":"forkcms","id":312505,"avatar_url":"https://avatars1.githubusercontent.com/u/312505?v=4","gravatar_id":"","url":"https://api.github.com/users/forkcms","html_url":"https://github.com/forkcms","followers_url":"https://api.github.com/users/forkcms/followers","following_url":"https://api.github.com/users/forkcms/following{/other_user}","gists_url":"https://api.github.com/users/forkcms/gists{/gist_id}","starred_url":"https://api.github.com/users/forkcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkcms/subscriptions","organizations_url":"https://api.github.com/users/forkcms/orgs","repos_url":"https://api.github.com/users/forkcms/repos","events_url":"https://api.github.com/users/forkcms/events{/privacy}","received_events_url":"https://api.github.com/users/forkcms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/forkcms/forkcms","description":"Fork is an easy to use open source CMS using Symfony Components.","fork":false,"url":"https://api.github.com/repos/forkcms/forkcms","forks_url":"https://api.github.com/repos/forkcms/forkcms/forks","keys_url":"https://api.github.com/repos/forkcms/forkcms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/forkcms/forkcms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/forkcms/forkcms/teams","hooks_url":"https://api.github.com/repos/forkcms/forkcms/hooks","issue_events_url":"https://api.github.com/repos/forkcms/forkcms/issues/events{/number}","events_url":"https://api.github.com/repos/forkcms/forkcms/events","assignees_url":"https://api.github.com/repos/forkcms/forkcms/assignees{/user}","branches_url":"https://api.github.com/repos/forkcms/forkcms/branches{/branch}","tags_url":"https://api.github.com/repos/forkcms/forkcms/tags","blobs_url":"https://api.github.com/repos/forkcms/forkcms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/forkcms/forkcms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/forkcms/forkcms/git/refs{/sha}","trees_url":"https://api.github.com/repos/forkcms/forkcms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/forkcms/forkcms/statuses/{sha}","languages_url":"https://api.github.com/repos/forkcms/forkcms/languages","stargazers_url":"https://api.github.com/repos/forkcms/forkcms/stargazers","contributors_url":"https://api.github.com/repos/forkcms/forkcms/contributors","subscribers_url":"https://api.github.com/repos/forkcms/forkcms/subscribers","subscription_url":"https://api.github.com/repos/forkcms/forkcms/subscription","commits_url":"https://api.github.com/repos/forkcms/forkcms/commits{/sha}","git_commits_url":"https://api.github.com/repos/forkcms/forkcms/git/commits{/sha}","comments_url":"https://api.github.com/repos/forkcms/forkcms/comments{/number}","issue_comment_url":"https://api.github.com/repos/forkcms/forkcms/issues/comments{/number}","contents_url":"https://api.github.com/repos/forkcms/forkcms/contents/{+path}","compare_url":"https://api.github.com/repos/forkcms/forkcms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/forkcms/forkcms/merges","archive_url":"https://api.github.com/repos/forkcms/forkcms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/forkcms/forkcms/downloads","issues_url":"https://api.github.com/repos/forkcms/forkcms/issues{/number}","pulls_url":"https://api.github.com/repos/forkcms/forkcms/pulls{/number}","milestones_url":"https://api.github.com/repos/forkcms/forkcms/milestones{/number}","notifications_url":"https://api.github.com/repos/forkcms/forkcms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/forkcms/forkcms/labels{/name}","releases_url":"https://api.github.com/repos/forkcms/forkcms/releases{/id}","deployments_url":"https://api.github.com/repos/forkcms/forkcms/deployments","created_at":"2010-12-04T18:06:15Z","updated_at":"2018-02-14T19:27:28Z","pushed_at":"2018-02-19T08:53:32Z","git_url":"git://github.com/forkcms/forkcms.git","ssh_url":"git@github.com:forkcms/forkcms.git","clone_url":"https://github.com/forkcms/forkcms.git","svn_url":"https://github.com/forkcms/forkcms","homepage":"http://www.fork-cms.com","size":74845,"stargazers_count":1007,"watchers_count":1007,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":263,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":263,"open_issues":59,"watchers":1007,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/2422"},"html":{"href":"https://github.com/forkcms/forkcms/pull/2422"},"issue":{"href":"https://api.github.com/repos/forkcms/forkcms/issues/2422"},"comments":{"href":"https://api.github.com/repos/forkcms/forkcms/issues/2422/comments"},"review_comments":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/2422/comments"},"review_comment":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/forkcms/forkcms/pulls/2422/commits"},"statuses":{"href":"https://api.github.com/repos/forkcms/forkcms/statuses/1f9d40f4c0dff33381dd9166c55308ee4b416688"}},"author_association":"OWNER"}}
{"actor":{"display_login":"jeroendesloovere"}}