{"action":"created","issue":{"url":"https://api.github.com/repos/philsturgeon/phpversions.info/issues/82","labels_url":"https://api.github.com/repos/philsturgeon/phpversions.info/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/philsturgeon/phpversions.info/issues/82/comments","events_url":"https://api.github.com/repos/philsturgeon/phpversions.info/issues/82/events","html_url":"https://github.com/philsturgeon/phpversions.info/issues/82","id":71893781,"number":82,"title":"[RFC] Rewrite in PHP (v2.0)","user":{"login":"philsturgeon","id":67381,"avatar_url":"https://avatars.githubusercontent.com/u/67381?v=3","gravatar_id":"","url":"https://api.github.com/users/philsturgeon","html_url":"https://github.com/philsturgeon","followers_url":"https://api.github.com/users/philsturgeon/followers","following_url":"https://api.github.com/users/philsturgeon/following{/other_user}","gists_url":"https://api.github.com/users/philsturgeon/gists{/gist_id}","starred_url":"https://api.github.com/users/philsturgeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philsturgeon/subscriptions","organizations_url":"https://api.github.com/users/philsturgeon/orgs","repos_url":"https://api.github.com/users/philsturgeon/repos","events_url":"https://api.github.com/users/philsturgeon/events{/privacy}","received_events_url":"https://api.github.com/users/philsturgeon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-04-29T14:38:22Z","updated_at":"2015-11-01T16:32:10Z","closed_at":null,"body":"If we call whatever crap is up there now to be v1.0, then v2.0 should be the bigger, better and more badass version.\r\n\r\nRight now it's a Jekyll based site with a YAML data store, which people have to send PRs too. That's obviously not ideal. \r\n\r\n### 1. Database\r\n\r\nI want to have a database powering this, with the following schema:\r\n\r\n**distributions**\r\n\r\nField | Type | Description\r\n------|------|------------\r\nid | autoint \r\nname                | string | Things like `Ubuntu 27.04 (Farty Ferrit)` \r\nurl                 | string\r\n\r\n\r\n**distributions_events**\r\n\r\nField | Type | Description\r\n------|------|------------\r\ndefault_php_version | string\r\ndate | datetime\r\nis_confirmed | bool | This will be set to true by the moderator, otherwise its just considered lies from a stranger.\r\n\r\n**hosts**\r\n\r\nField | Type | Description\r\n------|------|------------\r\nid | autoint \r\nname | string\r\nurl | string\r\n\r\n**hosts_events**\r\n\r\nField | Type | Description\r\n------|------|------------\r\nis_shared_host | bool | Heroku would be false. 1&1 would be true.\r\nlatest_patch_versions | hstore (php52=5.2.1, etc)\r\ndefault_php_version | string | Which PHP version will be there by default.\r\npatch_policy | enum[them,you] | Who is in charge of updating patch versions of PHP? These could be a bug fix and you might be on holiday, so `them` is good.\r\nmanual_update_major_minor | bool | Can you easily switch your website to a different major or minor version.\r\ndate | datetime | When was this suggested\r\nis_confirmed | bool | This will be set to true by the moderator, otherwise its just considered lies from a stranger.\r\n\r\n**versions**\r\n\r\nField | Type | Description\r\n------|------|------------\r\nversion | string\r\neol_at | datetime | When does this thing EOL roughly/exactly? \r\nhas_vulnerabilities | bool | the cron job should flip this to `false` if it finds vulns on the API.\r\nchecked_at | datetime\r\n\r\n**vulnerabilities**\r\n\r\nField | Type | Description\r\n------|------|------------\r\ncve_id | string\r\nrisk | numeric\r\nsummary | text\r\nfix_base_versions | array | Each minor branch will have a patch you should update to to fix this. Conflicted a bit because it'll recommend 4.0.0 users update to 4.0.1 which has its own issues. but hey, whatever for now.\r\n\r\nThe events stuff is all there so we can show a history, and not just \"what it looks like right now.\" This will make for some interesting graphs one day, but mostly also a handy \"history\" page for v3.0.\r\n\r\n### 2. Frontend\r\n\r\nExactly what it is now is fine for v2.0, but have red/yellow/green cell shading. \r\n\r\n- red - has vulnerabilities\r\n- yellow - EOL so upgrade dammit\r\n- green - so far so good\r\n\r\nIn addition to this, we need two basic-ass forms\r\n\r\n**Report Distribution Versions**\r\n\r\nDropdown of distributions, or a \"Submit new Distribution\" option. Then enter the bundled PHP version and you're done. \r\n\r\n**Report Host Versions**\r\n\r\nDropdown of hosts, or a \"Submit new Host\" option. \r\n\r\nShow input boxes for `5.2.[ ]`, `5.3.[ ]`, `5.4.[ ]`, `5.5.[ ]`, `5.6.[ ]`, `7.0.[ ]`. Leave it empty if unknown or not supported.\r\n\r\nShove that all in an email to me, and I'll ssh into the production DB because yolo.\r\n\r\n### 3. CRON\r\n\r\nWe should have a cron job running every few hours that looks up each version used by distros and hosts, and check to see if its secure by hitting `http://phpsecinfo.com/version/5.6.5`. \r\n\r\nIf it has vulnerabilities, save them in the vulnerabilities table and set `has_vulnerabilities` to true. Regardless, set checked_at date to `NOW()`.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/philsturgeon/phpversions.info/issues/comments/152842017","html_url":"https://github.com/philsturgeon/phpversions.info/issues/82#issuecomment-152842017","issue_url":"https://api.github.com/repos/philsturgeon/phpversions.info/issues/82","id":152842017,"user":{"login":"KorvinSzanto","id":1007419,"avatar_url":"https://avatars.githubusercontent.com/u/1007419?v=3","gravatar_id":"","url":"https://api.github.com/users/KorvinSzanto","html_url":"https://github.com/KorvinSzanto","followers_url":"https://api.github.com/users/KorvinSzanto/followers","following_url":"https://api.github.com/users/KorvinSzanto/following{/other_user}","gists_url":"https://api.github.com/users/KorvinSzanto/gists{/gist_id}","starred_url":"https://api.github.com/users/KorvinSzanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KorvinSzanto/subscriptions","organizations_url":"https://api.github.com/users/KorvinSzanto/orgs","repos_url":"https://api.github.com/users/KorvinSzanto/repos","events_url":"https://api.github.com/users/KorvinSzanto/events{/privacy}","received_events_url":"https://api.github.com/users/KorvinSzanto/received_events","type":"User","site_admin":false},"created_at":"2015-11-01T16:32:10Z","updated_at":"2015-11-01T16:32:10Z","body":"Where is this effort located? I'm interested in helping out."}}