{"action":"created","comment":{"url":"https://api.github.com/repos/vanilla/vanilla/pulls/comments/114931050","pull_request_review_id":36433978,"id":114931050,"diff_hunk":"@@ -0,0 +1,68 @@\n+<?php\n+/**\n+ * Bare minimum setup of the environment to use Vanilla's classes.\n+ *\n+ * @author Alexandre (DaazKu) Chouinard <alexandre.c@vanillaforums.com>\n+ * @copyright 2009-2017 Vanilla Forums Inc.\n+ * @license http://www.opensource.org/licenses/gpl-2.0.php GNU GPL v2\n+ */\n+\n+if (PHP_VERSION_ID < 50600) {\n+    die('Vanilla requires PHP 5.6 or greater.');\n+}\n+\n+// Define the constants we need to get going.\n+if (!defined('APPLICATION')) {\n+    define('APPLICATION', 'Vanilla');\n+}\n+if (!defined('APPLICATION_VERSION')) {\n+    define('APPLICATION_VERSION', '2.4.200');\n+}\n+if (!defined('DS')) {\n+    define('DS', DIRECTORY_SEPARATOR);\n+}\n+if (!defined('PATH_ROOT')) {\n+    define('PATH_ROOT', __DIR__);","path":"environment.php","position":25,"original_position":25,"commit_id":"9ad9caf106a193d6c0316b41de99c2f0313f8a4a","original_commit_id":"9ad9caf106a193d6c0316b41de99c2f0313f8a4a","user":{"login":"initvector","id":1390241,"avatar_url":"https://avatars3.githubusercontent.com/u/1390241?v=3","gravatar_id":"","url":"https://api.github.com/users/initvector","html_url":"https://github.com/initvector","followers_url":"https://api.github.com/users/initvector/followers","following_url":"https://api.github.com/users/initvector/following{/other_user}","gists_url":"https://api.github.com/users/initvector/gists{/gist_id}","starred_url":"https://api.github.com/users/initvector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/initvector/subscriptions","organizations_url":"https://api.github.com/users/initvector/orgs","repos_url":"https://api.github.com/users/initvector/repos","events_url":"https://api.github.com/users/initvector/events{/privacy}","received_events_url":"https://api.github.com/users/initvector/received_events","type":"User","site_admin":false},"body":"Vanilla currently establishes `PATH_ROOT` by using `getcwd`. Switching this up with `__DIR__` is going to change the way it works with symlinks.\r\n\r\nFor example, say I have a dir with a Git repo: /srv/src. I symlink certain directories and files from there into a separate directory to act as a site root: /srv/html. If I'm setting `PATH_ROOT` with `__DIR__`, it's going to get set to /srv/src. If I'm setting `PATH_ROOT` with `getcwd`, it gets set to /srv/html.\r\n\r\nSwitching up to `__DIR__` might be an improvement, but there is a subtle difference.","created_at":"2017-05-05T04:36:21Z","updated_at":"2017-05-05T04:36:22Z","html_url":"https://github.com/vanilla/vanilla/pull/5492#discussion_r114931050","pull_request_url":"https://api.github.com/repos/vanilla/vanilla/pulls/5492","_links":{"self":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/comments/114931050"},"html":{"href":"https://github.com/vanilla/vanilla/pull/5492#discussion_r114931050"},"pull_request":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/5492"}}},"pull_request":{"url":"https://api.github.com/repos/vanilla/vanilla/pulls/5492","id":118596530,"html_url":"https://github.com/vanilla/vanilla/pull/5492","diff_url":"https://github.com/vanilla/vanilla/pull/5492.diff","patch_url":"https://github.com/vanilla/vanilla/pull/5492.patch","issue_url":"https://api.github.com/repos/vanilla/vanilla/issues/5492","number":5492,"state":"open","locked":false,"title":"Refactor bootstraping and constants declaration","user":{"login":"DaazKu","id":2412909,"avatar_url":"https://avatars3.githubusercontent.com/u/2412909?v=3","gravatar_id":"","url":"https://api.github.com/users/DaazKu","html_url":"https://github.com/DaazKu","followers_url":"https://api.github.com/users/DaazKu/followers","following_url":"https://api.github.com/users/DaazKu/following{/other_user}","gists_url":"https://api.github.com/users/DaazKu/gists{/gist_id}","starred_url":"https://api.github.com/users/DaazKu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaazKu/subscriptions","organizations_url":"https://api.github.com/users/DaazKu/orgs","repos_url":"https://api.github.com/users/DaazKu/repos","events_url":"https://api.github.com/users/DaazKu/events{/privacy}","received_events_url":"https://api.github.com/users/DaazKu/received_events","type":"User","site_admin":false},"body":"Create an envsetup file that can be included to use most of vanilla framework right off the bat.\r\n\r\nThis is useful for unit testing or using Vanilla's classes in a CLI environment.","created_at":"2017-05-02T16:41:00Z","updated_at":"2017-05-05T04:36:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b90f3ba2fc863b5d89d2e31a72bea8fe5e870772","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vanilla/vanilla/pulls/5492/commits","review_comments_url":"https://api.github.com/repos/vanilla/vanilla/pulls/5492/comments","review_comment_url":"https://api.github.com/repos/vanilla/vanilla/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vanilla/vanilla/issues/5492/comments","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/9ad9caf106a193d6c0316b41de99c2f0313f8a4a","head":{"label":"vanilla:feature/minimal-setup","ref":"feature/minimal-setup","sha":"9ad9caf106a193d6c0316b41de99c2f0313f8a4a","user":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars2.githubusercontent.com/u/7443552?v=3","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"repo":{"id":232390,"name":"vanilla","full_name":"vanilla/vanilla","owner":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars2.githubusercontent.com/u/7443552?v=3","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vanilla/vanilla","description":"Vanilla is a powerfully simple discussion forum you can easily customize to make as unique as your community.","fork":false,"url":"https://api.github.com/repos/vanilla/vanilla","forks_url":"https://api.github.com/repos/vanilla/vanilla/forks","keys_url":"https://api.github.com/repos/vanilla/vanilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vanilla/vanilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vanilla/vanilla/teams","hooks_url":"https://api.github.com/repos/vanilla/vanilla/hooks","issue_events_url":"https://api.github.com/repos/vanilla/vanilla/issues/events{/number}","events_url":"https://api.github.com/repos/vanilla/vanilla/events","assignees_url":"https://api.github.com/repos/vanilla/vanilla/assignees{/user}","branches_url":"https://api.github.com/repos/vanilla/vanilla/branches{/branch}","tags_url":"https://api.github.com/repos/vanilla/vanilla/tags","blobs_url":"https://api.github.com/repos/vanilla/vanilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vanilla/vanilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vanilla/vanilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/vanilla/vanilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/{sha}","languages_url":"https://api.github.com/repos/vanilla/vanilla/languages","stargazers_url":"https://api.github.com/repos/vanilla/vanilla/stargazers","contributors_url":"https://api.github.com/repos/vanilla/vanilla/contributors","subscribers_url":"https://api.github.com/repos/vanilla/vanilla/subscribers","subscription_url":"https://api.github.com/repos/vanilla/vanilla/subscription","commits_url":"https://api.github.com/repos/vanilla/vanilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/vanilla/vanilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/vanilla/vanilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/vanilla/vanilla/issues/comments{/number}","contents_url":"https://api.github.com/repos/vanilla/vanilla/contents/{+path}","compare_url":"https://api.github.com/repos/vanilla/vanilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vanilla/vanilla/merges","archive_url":"https://api.github.com/repos/vanilla/vanilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vanilla/vanilla/downloads","issues_url":"https://api.github.com/repos/vanilla/vanilla/issues{/number}","pulls_url":"https://api.github.com/repos/vanilla/vanilla/pulls{/number}","milestones_url":"https://api.github.com/repos/vanilla/vanilla/milestones{/number}","notifications_url":"https://api.github.com/repos/vanilla/vanilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vanilla/vanilla/labels{/name}","releases_url":"https://api.github.com/repos/vanilla/vanilla/releases{/id}","deployments_url":"https://api.github.com/repos/vanilla/vanilla/deployments","created_at":"2009-06-21T01:41:25Z","updated_at":"2017-05-04T15:17:21Z","pushed_at":"2017-05-05T04:15:59Z","git_url":"git://github.com/vanilla/vanilla.git","ssh_url":"git@github.com:vanilla/vanilla.git","clone_url":"https://github.com/vanilla/vanilla.git","svn_url":"https://github.com/vanilla/vanilla","homepage":"https://open.vanillaforums.com","size":50205,"stargazers_count":1641,"watchers_count":1641,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":616,"mirror_url":null,"open_issues_count":423,"forks":616,"open_issues":423,"watchers":1641,"default_branch":"master"}},"base":{"label":"vanilla:master","ref":"master","sha":"73761640f68e1428cd30e1c58835ae610954f1dc","user":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars2.githubusercontent.com/u/7443552?v=3","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"repo":{"id":232390,"name":"vanilla","full_name":"vanilla/vanilla","owner":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars2.githubusercontent.com/u/7443552?v=3","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vanilla/vanilla","description":"Vanilla is a powerfully simple discussion forum you can easily customize to make as unique as your community.","fork":false,"url":"https://api.github.com/repos/vanilla/vanilla","forks_url":"https://api.github.com/repos/vanilla/vanilla/forks","keys_url":"https://api.github.com/repos/vanilla/vanilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vanilla/vanilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vanilla/vanilla/teams","hooks_url":"https://api.github.com/repos/vanilla/vanilla/hooks","issue_events_url":"https://api.github.com/repos/vanilla/vanilla/issues/events{/number}","events_url":"https://api.github.com/repos/vanilla/vanilla/events","assignees_url":"https://api.github.com/repos/vanilla/vanilla/assignees{/user}","branches_url":"https://api.github.com/repos/vanilla/vanilla/branches{/branch}","tags_url":"https://api.github.com/repos/vanilla/vanilla/tags","blobs_url":"https://api.github.com/repos/vanilla/vanilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vanilla/vanilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vanilla/vanilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/vanilla/vanilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/{sha}","languages_url":"https://api.github.com/repos/vanilla/vanilla/languages","stargazers_url":"https://api.github.com/repos/vanilla/vanilla/stargazers","contributors_url":"https://api.github.com/repos/vanilla/vanilla/contributors","subscribers_url":"https://api.github.com/repos/vanilla/vanilla/subscribers","subscription_url":"https://api.github.com/repos/vanilla/vanilla/subscription","commits_url":"https://api.github.com/repos/vanilla/vanilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/vanilla/vanilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/vanilla/vanilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/vanilla/vanilla/issues/comments{/number}","contents_url":"https://api.github.com/repos/vanilla/vanilla/contents/{+path}","compare_url":"https://api.github.com/repos/vanilla/vanilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vanilla/vanilla/merges","archive_url":"https://api.github.com/repos/vanilla/vanilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vanilla/vanilla/downloads","issues_url":"https://api.github.com/repos/vanilla/vanilla/issues{/number}","pulls_url":"https://api.github.com/repos/vanilla/vanilla/pulls{/number}","milestones_url":"https://api.github.com/repos/vanilla/vanilla/milestones{/number}","notifications_url":"https://api.github.com/repos/vanilla/vanilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vanilla/vanilla/labels{/name}","releases_url":"https://api.github.com/repos/vanilla/vanilla/releases{/id}","deployments_url":"https://api.github.com/repos/vanilla/vanilla/deployments","created_at":"2009-06-21T01:41:25Z","updated_at":"2017-05-04T15:17:21Z","pushed_at":"2017-05-05T04:15:59Z","git_url":"git://github.com/vanilla/vanilla.git","ssh_url":"git@github.com:vanilla/vanilla.git","clone_url":"https://github.com/vanilla/vanilla.git","svn_url":"https://github.com/vanilla/vanilla","homepage":"https://open.vanillaforums.com","size":50205,"stargazers_count":1641,"watchers_count":1641,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":616,"mirror_url":null,"open_issues_count":423,"forks":616,"open_issues":423,"watchers":1641,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/5492"},"html":{"href":"https://github.com/vanilla/vanilla/pull/5492"},"issue":{"href":"https://api.github.com/repos/vanilla/vanilla/issues/5492"},"comments":{"href":"https://api.github.com/repos/vanilla/vanilla/issues/5492/comments"},"review_comments":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/5492/comments"},"review_comment":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/5492/commits"},"statuses":{"href":"https://api.github.com/repos/vanilla/vanilla/statuses/9ad9caf106a193d6c0316b41de99c2f0313f8a4a"}}}}
{"actor":{"display_login":"initvector"}}