{"action":"created","comment":{"url":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/comments/218867937","pull_request_review_id":156902956,"id":218867937,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODg2NzkzNw==","diff_hunk":"@@ -58,57 +74,87 @@ public function __construct()\n         $this->description = $this->trans('Adds a block with several links.', array(), 'Modules.Linklist.Admin');\n         $this->secure_key = Tools::encrypt($this->name);\n \n-        $this->ps_versions_compliancy = array('min' => '1.7.1.0', 'max' => _PS_VERSION_);\n+        $this->ps_versions_compliancy = array('min' => '1.7.5.0', 'max' => _PS_VERSION_);\n         $this->templateFile = 'module:ps_linklist/views/templates/hook/linkblock.tpl';\n \n         $this->linkBlockPresenter = new LinkBlockPresenter(new Link(), $this->context->language);\n-        $this->linkBlockRepository = new LinkBlockRepository(Db::getInstance(), $this->context->shop, $this->context->getTranslator());\n+        $this->legacyBlockRepository = new LegacyLinkBlockRepository(Db::getInstance(), $this->context->shop, $this->context->getTranslator());\n     }\n \n     public function install()\n     {\n-        return parent::install()\n-            && $this->installTab()\n-            && $this->linkBlockRepository->createTables()\n-            && $this->linkBlockRepository->installFixtures()\n+        if (!parent::install()) {\n+            return false;\n+        }\n+        $installed = true;\n+\n+        $errors = $this->getRepository()->createTables();\n+        if (!empty($errors)) {\n+            $this->addModuleErrors($errors);\n+            $installed = false;\n+        }\n+\n+        $errors = $this->getRepository()->installFixtures();\n+        if (!empty($errors)) {\n+            $this->addModuleErrors($errors);\n+            $installed = false;\n+        }\n+\n+        if ($installed\n             && $this->registerHook('displayFooter')\n-            && $this->registerHook('actionUpdateLangAfter');\n+            && $this->registerHook('actionUpdateLangAfter')\n+            && $this->installTab()) {\n+            return true;\n+        }\n+\n+        parent::uninstall();\n+\n+        return false;\n     }\n \n     public function uninstall()\n     {\n-        return parent::uninstall()\n-            && $this->uninstallTab()\n-            && $this->linkBlockRepository->dropTables();\n+        $uninstalled = true;\n+        if (!$this->uninstallTab()) {\n+            $this->_errors[] = $this->trans('Could not remove Tab.', array(), 'Admin.Modules.Notification');\n+            $uninstalled = false;\n+        }\n+        $errors = $this->getRepository()->dropTables();\n+        if (!empty($errors)) {\n+            $this->addModuleErrors($errors);\n+            $uninstalled = false;\n+        }\n+\n+        return $uninstalled && parent::uninstall();\n     }\n \n     public function installTab()","path":"ps_linklist.php","position":158,"original_position":155,"commit_id":"5a42306db087d2411b6dfb1e6fd419c619ff3e71","original_commit_id":"7c1dfe57c4d1771e0fc74514bce48ff43833c634","user":{"login":"jolelievre","id":13801017,"node_id":"MDQ6VXNlcjEzODAxMDE3","avatar_url":"https://avatars1.githubusercontent.com/u/13801017?v=4","gravatar_id":"","url":"https://api.github.com/users/jolelievre","html_url":"https://github.com/jolelievre","followers_url":"https://api.github.com/users/jolelievre/followers","following_url":"https://api.github.com/users/jolelievre/following{/other_user}","gists_url":"https://api.github.com/users/jolelievre/gists{/gist_id}","starred_url":"https://api.github.com/users/jolelievre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolelievre/subscriptions","organizations_url":"https://api.github.com/users/jolelievre/orgs","repos_url":"https://api.github.com/users/jolelievre/repos","events_url":"https://api.github.com/users/jolelievre/events{/privacy}","received_events_url":"https://api.github.com/users/jolelievre/received_events","type":"User","site_admin":false},"body":"so I don't have a choice but to create the tab \"manually\" ?","created_at":"2018-09-19T16:10:49Z","updated_at":"2018-09-19T16:10:49Z","html_url":"https://github.com/PrestaShop/ps_linklist/pull/48#discussion_r218867937","pull_request_url":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/48","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/comments/218867937"},"html":{"href":"https://github.com/PrestaShop/ps_linklist/pull/48#discussion_r218867937"},"pull_request":{"href":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/48"}},"in_reply_to_id":217537524},"pull_request":{"url":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/48","id":212125979,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMTI1OTc5","html_url":"https://github.com/PrestaShop/ps_linklist/pull/48","diff_url":"https://github.com/PrestaShop/ps_linklist/pull/48.diff","patch_url":"https://github.com/PrestaShop/ps_linklist/pull/48.patch","issue_url":"https://api.github.com/repos/PrestaShop/ps_linklist/issues/48","number":48,"state":"open","locked":false,"title":"refactored ps_linklist module using 1.7 improvements","user":{"login":"jolelievre","id":13801017,"node_id":"MDQ6VXNlcjEzODAxMDE3","avatar_url":"https://avatars1.githubusercontent.com/u/13801017?v=4","gravatar_id":"","url":"https://api.github.com/users/jolelievre","html_url":"https://github.com/jolelievre","followers_url":"https://api.github.com/users/jolelievre/followers","following_url":"https://api.github.com/users/jolelievre/following{/other_user}","gists_url":"https://api.github.com/users/jolelievre/gists{/gist_id}","starred_url":"https://api.github.com/users/jolelievre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolelievre/subscriptions","organizations_url":"https://api.github.com/users/jolelievre/orgs","repos_url":"https://api.github.com/users/jolelievre/repos","events_url":"https://api.github.com/users/jolelievre/events{/privacy}","received_events_url":"https://api.github.com/users/jolelievre/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you for contributing to the PrestaShop project! \r\n\r\nPlease take the time to edit the \"Answers\" rows with the necessary information.\r\n\r\nCheck out our contribution guidelines to find out how to complete it:\r\nhttps://devdocs.prestashop.com/1.7/contribute/contribution-guidelines/#pull-requests\r\n -->\r\n\r\n| Questions     | Answers\r\n| ------------- | -------------------------------------------------------\r\n| Branch?       | develop\r\n| Description?  | Symfony migration of the module using the new Grid component, namespaces, Symfony controllers, ...\r\n| Type?         | improvement\r\n| Category?     | BO\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Fixed ticket? | Fixes #9746\r\n| How to test?  | You need to clone the module and select the migrate-sf branch, BE CAREFULL you also need to use the link-modules branch https://github.com/jolelievre/PrestaShop as there are required changes in the Core (cf https://github.com/PrestaShop/PrestaShop/pull/10414) Then try to uninstall and reinstall the module and finally test the module in Design > Link Widget\r\n\r\n<!-- Click the form's \"Preview\" button to make sure the table is functional in GitHub. Thank you! -->\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/prestashop/prestashop/10414)\r\n<!-- Reviewable:end -->\r\n","created_at":"2018-08-30T15:45:25Z","updated_at":"2018-09-19T16:10:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d7ec2d0e9042389b8ccf4498490c9442eedcd07","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/48/commits","review_comments_url":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/48/comments","review_comment_url":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PrestaShop/ps_linklist/issues/48/comments","statuses_url":"https://api.github.com/repos/PrestaShop/ps_linklist/statuses/5a42306db087d2411b6dfb1e6fd419c619ff3e71","head":{"label":"jolelievre:migrate-sf","ref":"migrate-sf","sha":"5a42306db087d2411b6dfb1e6fd419c619ff3e71","user":{"login":"jolelievre","id":13801017,"node_id":"MDQ6VXNlcjEzODAxMDE3","avatar_url":"https://avatars1.githubusercontent.com/u/13801017?v=4","gravatar_id":"","url":"https://api.github.com/users/jolelievre","html_url":"https://github.com/jolelievre","followers_url":"https://api.github.com/users/jolelievre/followers","following_url":"https://api.github.com/users/jolelievre/following{/other_user}","gists_url":"https://api.github.com/users/jolelievre/gists{/gist_id}","starred_url":"https://api.github.com/users/jolelievre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolelievre/subscriptions","organizations_url":"https://api.github.com/users/jolelievre/orgs","repos_url":"https://api.github.com/users/jolelievre/repos","events_url":"https://api.github.com/users/jolelievre/events{/privacy}","received_events_url":"https://api.github.com/users/jolelievre/received_events","type":"User","site_admin":false},"repo":{"id":145835104,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU4MzUxMDQ=","name":"ps_linklist","full_name":"jolelievre/ps_linklist","private":false,"owner":{"login":"jolelievre","id":13801017,"node_id":"MDQ6VXNlcjEzODAxMDE3","avatar_url":"https://avatars1.githubusercontent.com/u/13801017?v=4","gravatar_id":"","url":"https://api.github.com/users/jolelievre","html_url":"https://github.com/jolelievre","followers_url":"https://api.github.com/users/jolelievre/followers","following_url":"https://api.github.com/users/jolelievre/following{/other_user}","gists_url":"https://api.github.com/users/jolelievre/gists{/gist_id}","starred_url":"https://api.github.com/users/jolelievre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolelievre/subscriptions","organizations_url":"https://api.github.com/users/jolelievre/orgs","repos_url":"https://api.github.com/users/jolelievre/repos","events_url":"https://api.github.com/users/jolelievre/events{/privacy}","received_events_url":"https://api.github.com/users/jolelievre/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jolelievre/ps_linklist","description":null,"fork":true,"url":"https://api.github.com/repos/jolelievre/ps_linklist","forks_url":"https://api.github.com/repos/jolelievre/ps_linklist/forks","keys_url":"https://api.github.com/repos/jolelievre/ps_linklist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jolelievre/ps_linklist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jolelievre/ps_linklist/teams","hooks_url":"https://api.github.com/repos/jolelievre/ps_linklist/hooks","issue_events_url":"https://api.github.com/repos/jolelievre/ps_linklist/issues/events{/number}","events_url":"https://api.github.com/repos/jolelievre/ps_linklist/events","assignees_url":"https://api.github.com/repos/jolelievre/ps_linklist/assignees{/user}","branches_url":"https://api.github.com/repos/jolelievre/ps_linklist/branches{/branch}","tags_url":"https://api.github.com/repos/jolelievre/ps_linklist/tags","blobs_url":"https://api.github.com/repos/jolelievre/ps_linklist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jolelievre/ps_linklist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jolelievre/ps_linklist/git/refs{/sha}","trees_url":"https://api.github.com/repos/jolelievre/ps_linklist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jolelievre/ps_linklist/statuses/{sha}","languages_url":"https://api.github.com/repos/jolelievre/ps_linklist/languages","stargazers_url":"https://api.github.com/repos/jolelievre/ps_linklist/stargazers","contributors_url":"https://api.github.com/repos/jolelievre/ps_linklist/contributors","subscribers_url":"https://api.github.com/repos/jolelievre/ps_linklist/subscribers","subscription_url":"https://api.github.com/repos/jolelievre/ps_linklist/subscription","commits_url":"https://api.github.com/repos/jolelievre/ps_linklist/commits{/sha}","git_commits_url":"https://api.github.com/repos/jolelievre/ps_linklist/git/commits{/sha}","comments_url":"https://api.github.com/repos/jolelievre/ps_linklist/comments{/number}","issue_comment_url":"https://api.github.com/repos/jolelievre/ps_linklist/issues/comments{/number}","contents_url":"https://api.github.com/repos/jolelievre/ps_linklist/contents/{+path}","compare_url":"https://api.github.com/repos/jolelievre/ps_linklist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jolelievre/ps_linklist/merges","archive_url":"https://api.github.com/repos/jolelievre/ps_linklist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jolelievre/ps_linklist/downloads","issues_url":"https://api.github.com/repos/jolelievre/ps_linklist/issues{/number}","pulls_url":"https://api.github.com/repos/jolelievre/ps_linklist/pulls{/number}","milestones_url":"https://api.github.com/repos/jolelievre/ps_linklist/milestones{/number}","notifications_url":"https://api.github.com/repos/jolelievre/ps_linklist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jolelievre/ps_linklist/labels{/name}","releases_url":"https://api.github.com/repos/jolelievre/ps_linklist/releases{/id}","deployments_url":"https://api.github.com/repos/jolelievre/ps_linklist/deployments","created_at":"2018-08-23T09:58:13Z","updated_at":"2018-08-23T09:58:15Z","pushed_at":"2018-09-19T16:07:24Z","git_url":"git://github.com/jolelievre/ps_linklist.git","ssh_url":"git@github.com:jolelievre/ps_linklist.git","clone_url":"https://github.com/jolelievre/ps_linklist.git","svn_url":"https://github.com/jolelievre/ps_linklist","homepage":null,"size":462,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PrestaShop:master","ref":"master","sha":"a901d458f8f6a90059399a3f40166851e956642b","user":{"login":"PrestaShop","id":2815696,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTU2OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/2815696?v=4","gravatar_id":"","url":"https://api.github.com/users/PrestaShop","html_url":"https://github.com/PrestaShop","followers_url":"https://api.github.com/users/PrestaShop/followers","following_url":"https://api.github.com/users/PrestaShop/following{/other_user}","gists_url":"https://api.github.com/users/PrestaShop/gists{/gist_id}","starred_url":"https://api.github.com/users/PrestaShop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PrestaShop/subscriptions","organizations_url":"https://api.github.com/users/PrestaShop/orgs","repos_url":"https://api.github.com/users/PrestaShop/repos","events_url":"https://api.github.com/users/PrestaShop/events{/privacy}","received_events_url":"https://api.github.com/users/PrestaShop/received_events","type":"Organization","site_admin":false},"repo":{"id":53313517,"node_id":"MDEwOlJlcG9zaXRvcnk1MzMxMzUxNw==","name":"ps_linklist","full_name":"PrestaShop/ps_linklist","private":false,"owner":{"login":"PrestaShop","id":2815696,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTU2OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/2815696?v=4","gravatar_id":"","url":"https://api.github.com/users/PrestaShop","html_url":"https://github.com/PrestaShop","followers_url":"https://api.github.com/users/PrestaShop/followers","following_url":"https://api.github.com/users/PrestaShop/following{/other_user}","gists_url":"https://api.github.com/users/PrestaShop/gists{/gist_id}","starred_url":"https://api.github.com/users/PrestaShop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PrestaShop/subscriptions","organizations_url":"https://api.github.com/users/PrestaShop/orgs","repos_url":"https://api.github.com/users/PrestaShop/repos","events_url":"https://api.github.com/users/PrestaShop/events{/privacy}","received_events_url":"https://api.github.com/users/PrestaShop/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/PrestaShop/ps_linklist","description":null,"fork":false,"url":"https://api.github.com/repos/PrestaShop/ps_linklist","forks_url":"https://api.github.com/repos/PrestaShop/ps_linklist/forks","keys_url":"https://api.github.com/repos/PrestaShop/ps_linklist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PrestaShop/ps_linklist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PrestaShop/ps_linklist/teams","hooks_url":"https://api.github.com/repos/PrestaShop/ps_linklist/hooks","issue_events_url":"https://api.github.com/repos/PrestaShop/ps_linklist/issues/events{/number}","events_url":"https://api.github.com/repos/PrestaShop/ps_linklist/events","assignees_url":"https://api.github.com/repos/PrestaShop/ps_linklist/assignees{/user}","branches_url":"https://api.github.com/repos/PrestaShop/ps_linklist/branches{/branch}","tags_url":"https://api.github.com/repos/PrestaShop/ps_linklist/tags","blobs_url":"https://api.github.com/repos/PrestaShop/ps_linklist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PrestaShop/ps_linklist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PrestaShop/ps_linklist/git/refs{/sha}","trees_url":"https://api.github.com/repos/PrestaShop/ps_linklist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PrestaShop/ps_linklist/statuses/{sha}","languages_url":"https://api.github.com/repos/PrestaShop/ps_linklist/languages","stargazers_url":"https://api.github.com/repos/PrestaShop/ps_linklist/stargazers","contributors_url":"https://api.github.com/repos/PrestaShop/ps_linklist/contributors","subscribers_url":"https://api.github.com/repos/PrestaShop/ps_linklist/subscribers","subscription_url":"https://api.github.com/repos/PrestaShop/ps_linklist/subscription","commits_url":"https://api.github.com/repos/PrestaShop/ps_linklist/commits{/sha}","git_commits_url":"https://api.github.com/repos/PrestaShop/ps_linklist/git/commits{/sha}","comments_url":"https://api.github.com/repos/PrestaShop/ps_linklist/comments{/number}","issue_comment_url":"https://api.github.com/repos/PrestaShop/ps_linklist/issues/comments{/number}","contents_url":"https://api.github.com/repos/PrestaShop/ps_linklist/contents/{+path}","compare_url":"https://api.github.com/repos/PrestaShop/ps_linklist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PrestaShop/ps_linklist/merges","archive_url":"https://api.github.com/repos/PrestaShop/ps_linklist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PrestaShop/ps_linklist/downloads","issues_url":"https://api.github.com/repos/PrestaShop/ps_linklist/issues{/number}","pulls_url":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls{/number}","milestones_url":"https://api.github.com/repos/PrestaShop/ps_linklist/milestones{/number}","notifications_url":"https://api.github.com/repos/PrestaShop/ps_linklist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PrestaShop/ps_linklist/labels{/name}","releases_url":"https://api.github.com/repos/PrestaShop/ps_linklist/releases{/id}","deployments_url":"https://api.github.com/repos/PrestaShop/ps_linklist/deployments","created_at":"2016-03-07T09:37:22Z","updated_at":"2018-06-05T12:04:16Z","pushed_at":"2018-09-19T16:07:26Z","git_url":"git://github.com/PrestaShop/ps_linklist.git","ssh_url":"git@github.com:PrestaShop/ps_linklist.git","clone_url":"https://github.com/PrestaShop/ps_linklist.git","svn_url":"https://github.com/PrestaShop/ps_linklist","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":19,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/48"},"html":{"href":"https://github.com/PrestaShop/ps_linklist/pull/48"},"issue":{"href":"https://api.github.com/repos/PrestaShop/ps_linklist/issues/48"},"comments":{"href":"https://api.github.com/repos/PrestaShop/ps_linklist/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PrestaShop/ps_linklist/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/PrestaShop/ps_linklist/statuses/5a42306db087d2411b6dfb1e6fd419c619ff3e71"}},"author_association":"NONE"}}
{"actor":{"display_login":"jolelievre"}}