{"action":"created","comment":{"url":"https://api.github.com/repos/piwik/piwik/pulls/comments/28292699","id":28292699,"diff_hunk":"@@ -22,7 +22,7 @@ class Http\n     /**\n      * Returns the \"best\" available transport method for {@link sendHttpRequest()} calls.\n      *\n-     * @return string Either `'curl'`, `'fopen'` or `'socket'`.\n+     * @return string|null Either curl, fopen, socket or null of no method is supported.","path":"core/Http.php","position":5,"original_position":5,"commit_id":"9a061c77c8eb9612278225042ecb0a163474720d","original_commit_id":"9a061c77c8eb9612278225042ecb0a163474720d","user":{"login":"diosmosis","id":125140,"avatar_url":"https://avatars.githubusercontent.com/u/125140?v=3","gravatar_id":"","url":"https://api.github.com/users/diosmosis","html_url":"https://github.com/diosmosis","followers_url":"https://api.github.com/users/diosmosis/followers","following_url":"https://api.github.com/users/diosmosis/following{/other_user}","gists_url":"https://api.github.com/users/diosmosis/gists{/gist_id}","starred_url":"https://api.github.com/users/diosmosis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diosmosis/subscriptions","organizations_url":"https://api.github.com/users/diosmosis/orgs","repos_url":"https://api.github.com/users/diosmosis/repos","events_url":"https://api.github.com/users/diosmosis/events{/privacy}","received_events_url":"https://api.github.com/users/diosmosis/received_events","type":"User","site_admin":false},"body":"FYI, not sure if you know this, but it should get outputted as inline code on developer.piwik.org if backticks are used (since it's markdown). If it's more readable, though there's no issue.","created_at":"2015-04-14T00:36:40Z","updated_at":"2015-04-14T00:36:40Z","html_url":"https://github.com/piwik/piwik/pull/7646#discussion_r28292699","pull_request_url":"https://api.github.com/repos/piwik/piwik/pulls/7646","_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments/28292699"},"html":{"href":"https://github.com/piwik/piwik/pull/7646#discussion_r28292699"},"pull_request":{"href":"https://api.github.com/repos/piwik/piwik/pulls/7646"}}},"pull_request":{"url":"https://api.github.com/repos/piwik/piwik/pulls/7646","id":32911280,"html_url":"https://github.com/piwik/piwik/pull/7646","diff_url":"https://github.com/piwik/piwik/pull/7646.diff","patch_url":"https://github.com/piwik/piwik/pull/7646.patch","issue_url":"https://api.github.com/repos/piwik/piwik/issues/7646","number":7646,"state":"open","locked":false,"title":"Refactored the system check to allow plugins to add new diagnostics","user":{"login":"mnapoli","id":720328,"avatar_url":"https://avatars.githubusercontent.com/u/720328?v=3","gravatar_id":"","url":"https://api.github.com/users/mnapoli","html_url":"https://github.com/mnapoli","followers_url":"https://api.github.com/users/mnapoli/followers","following_url":"https://api.github.com/users/mnapoli/following{/other_user}","gists_url":"https://api.github.com/users/mnapoli/gists{/gist_id}","starred_url":"https://api.github.com/users/mnapoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnapoli/subscriptions","organizations_url":"https://api.github.com/users/mnapoli/orgs","repos_url":"https://api.github.com/users/mnapoli/repos","events_url":"https://api.github.com/users/mnapoli/events{/privacy}","received_events_url":"https://api.github.com/users/mnapoli/received_events","type":"User","site_admin":false},"body":"Addresses #7235 and #6726\r\n\r\nI have refactored the system check: each check goes into a separate class, thus breaking the big (500 lines long) `SystemCheck` class + big (400 lines) Twig template into small classes (the twig template is now dead simple).\r\n\r\nIt allows plugins to provide their own `Diagnostics`, as they can be configured through the container (this is a good illustration of the possibilities of the DI config, if there are issues with this we could consider an alternative solution). To give you an idea, here is how you create a new diagnostic:\r\n\r\n- implement the `Diagnostic` interface\r\n- add it to the `diagnostics.mandatory` or `diagnostics.optional` list, for example:\r\n\r\n    ```php\r\n    'diagnostics.optional' => DI\\add(array(\r\n        DI\\link('Piwik\\Plugins\\CoreUpdater\\Diagnostic\\HttpsUpdateCheck'),\r\n    )),\r\n    ```\r\n\r\nAs such I have moved a few diagnostics to the plugin they belong to (e.g. \"update over HTTPS\" check is in the CoreUpdater now, as shown in the example above).\r\n\r\nGiven the logic is no longer split between the controller + view + `SystemCheck` class, it was very easy to implement a console command: `diagnostic:run` that runs the system check in the command line.\r\n\r\n```bash\r\n$ ./console diagnostic:run        # will show only the warnings and errors\r\n$ ./console diagnostic:run --all  # will show all diagnostics\r\n```\r\n\r\n![capture d ecran 2015-04-09 a 11 05 14](https://cloud.githubusercontent.com/assets/720328/7057294/64ebf650-dea8-11e4-8a20-e379cf52ffb4.png)\r\n\r\nI have also discussed with Michal and that command will replace the existing `enterpriseadmin:systemcheck` (BC kept with an alias) which was kind of hacking the current implementation to allow it to run in CLI. I have a pull request ready for EnterpriseAdmin.","created_at":"2015-04-08T23:08:02Z","updated_at":"2015-04-14T00:36:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b833395682611985dbd4eadc12e8aa34c94beda","assignee":null,"milestone":{"url":"https://api.github.com/repos/piwik/piwik/milestones/76","html_url":"https://github.com/piwik/piwik/milestones/Piwik%202.13.0","labels_url":"https://api.github.com/repos/piwik/piwik/milestones/76/labels","id":969583,"number":76,"title":"Piwik 2.13.0","description":"Pool of tickets we pick issues to work on. This release may include DB schema upgrades.\r\n","creator":{"login":"mattab","id":466765,"avatar_url":"https://avatars.githubusercontent.com/u/466765?v=3","gravatar_id":"","url":"https://api.github.com/users/mattab","html_url":"https://github.com/mattab","followers_url":"https://api.github.com/users/mattab/followers","following_url":"https://api.github.com/users/mattab/following{/other_user}","gists_url":"https://api.github.com/users/mattab/gists{/gist_id}","starred_url":"https://api.github.com/users/mattab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattab/subscriptions","organizations_url":"https://api.github.com/users/mattab/orgs","repos_url":"https://api.github.com/users/mattab/repos","events_url":"https://api.github.com/users/mattab/events{/privacy}","received_events_url":"https://api.github.com/users/mattab/received_events","type":"User","site_admin":false},"open_issues":38,"closed_issues":66,"state":"open","created_at":"2015-02-07T01:34:22Z","updated_at":"2015-04-13T23:59:39Z","due_on":"2015-04-21T12:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/piwik/piwik/pulls/7646/commits","review_comments_url":"https://api.github.com/repos/piwik/piwik/pulls/7646/comments","review_comment_url":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/7646/comments","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/9a061c77c8eb9612278225042ecb0a163474720d","head":{"label":"piwik:diagnostics","ref":"diagnostics","sha":"9a061c77c8eb9612278225042ecb0a163474720d","user":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"piwik","full_name":"piwik/piwik","owner":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/piwik/piwik","description":"Liberating Web Analytics. Star us on Github? +1. Piwik is the leading open alternative to Google Analytics that gives you full control over your data. Piwik lets you easily collect data from websites, apps & IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests! ","fork":false,"url":"https://api.github.com/repos/piwik/piwik","forks_url":"https://api.github.com/repos/piwik/piwik/forks","keys_url":"https://api.github.com/repos/piwik/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piwik/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piwik/piwik/teams","hooks_url":"https://api.github.com/repos/piwik/piwik/hooks","issue_events_url":"https://api.github.com/repos/piwik/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/piwik/piwik/events","assignees_url":"https://api.github.com/repos/piwik/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/piwik/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/piwik/piwik/tags","blobs_url":"https://api.github.com/repos/piwik/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piwik/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piwik/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/piwik/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/piwik/piwik/languages","stargazers_url":"https://api.github.com/repos/piwik/piwik/stargazers","contributors_url":"https://api.github.com/repos/piwik/piwik/contributors","subscribers_url":"https://api.github.com/repos/piwik/piwik/subscribers","subscription_url":"https://api.github.com/repos/piwik/piwik/subscription","commits_url":"https://api.github.com/repos/piwik/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/piwik/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/piwik/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/piwik/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/piwik/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/piwik/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piwik/piwik/merges","archive_url":"https://api.github.com/repos/piwik/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piwik/piwik/downloads","issues_url":"https://api.github.com/repos/piwik/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/piwik/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/piwik/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/piwik/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piwik/piwik/labels{/name}","releases_url":"https://api.github.com/repos/piwik/piwik/releases{/id}","created_at":"2011-03-30T21:18:17Z","updated_at":"2015-04-14T00:03:32Z","pushed_at":"2015-04-14T00:03:32Z","git_url":"git://github.com/piwik/piwik.git","ssh_url":"git@github.com:piwik/piwik.git","clone_url":"https://github.com/piwik/piwik.git","svn_url":"https://github.com/piwik/piwik","homepage":"http://piwik.org/","size":285746,"stargazers_count":3697,"watchers_count":3697,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":674,"mirror_url":null,"open_issues_count":953,"forks":674,"open_issues":953,"watchers":3697,"default_branch":"master"}},"base":{"label":"piwik:master","ref":"master","sha":"abe50fa2ae06ae2c58385199e339c2b1e617e01b","user":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"piwik","full_name":"piwik/piwik","owner":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/piwik/piwik","description":"Liberating Web Analytics. Star us on Github? +1. Piwik is the leading open alternative to Google Analytics that gives you full control over your data. Piwik lets you easily collect data from websites, apps & IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests! ","fork":false,"url":"https://api.github.com/repos/piwik/piwik","forks_url":"https://api.github.com/repos/piwik/piwik/forks","keys_url":"https://api.github.com/repos/piwik/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piwik/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piwik/piwik/teams","hooks_url":"https://api.github.com/repos/piwik/piwik/hooks","issue_events_url":"https://api.github.com/repos/piwik/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/piwik/piwik/events","assignees_url":"https://api.github.com/repos/piwik/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/piwik/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/piwik/piwik/tags","blobs_url":"https://api.github.com/repos/piwik/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piwik/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piwik/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/piwik/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/piwik/piwik/languages","stargazers_url":"https://api.github.com/repos/piwik/piwik/stargazers","contributors_url":"https://api.github.com/repos/piwik/piwik/contributors","subscribers_url":"https://api.github.com/repos/piwik/piwik/subscribers","subscription_url":"https://api.github.com/repos/piwik/piwik/subscription","commits_url":"https://api.github.com/repos/piwik/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/piwik/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/piwik/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/piwik/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/piwik/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/piwik/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piwik/piwik/merges","archive_url":"https://api.github.com/repos/piwik/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piwik/piwik/downloads","issues_url":"https://api.github.com/repos/piwik/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/piwik/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/piwik/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/piwik/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piwik/piwik/labels{/name}","releases_url":"https://api.github.com/repos/piwik/piwik/releases{/id}","created_at":"2011-03-30T21:18:17Z","updated_at":"2015-04-14T00:03:32Z","pushed_at":"2015-04-14T00:03:32Z","git_url":"git://github.com/piwik/piwik.git","ssh_url":"git@github.com:piwik/piwik.git","clone_url":"https://github.com/piwik/piwik.git","svn_url":"https://github.com/piwik/piwik","homepage":"http://piwik.org/","size":285746,"stargazers_count":3697,"watchers_count":3697,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":674,"mirror_url":null,"open_issues_count":953,"forks":674,"open_issues":953,"watchers":3697,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/7646"},"html":{"href":"https://github.com/piwik/piwik/pull/7646"},"issue":{"href":"https://api.github.com/repos/piwik/piwik/issues/7646"},"comments":{"href":"https://api.github.com/repos/piwik/piwik/issues/7646/comments"},"review_comments":{"href":"https://api.github.com/repos/piwik/piwik/pulls/7646/comments"},"review_comment":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/piwik/piwik/pulls/7646/commits"},"statuses":{"href":"https://api.github.com/repos/piwik/piwik/statuses/9a061c77c8eb9612278225042ecb0a163474720d"}}}}