{"action":"closed","number":8367,"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/8367","id":214120140,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MTIwMTQw","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/8367","diff_url":"https://github.com/silverstripe/silverstripe-framework/pull/8367.diff","patch_url":"https://github.com/silverstripe/silverstripe-framework/pull/8367.patch","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/8367","number":8367,"state":"closed","locked":false,"title":"Include custom bootstrap.php file if one exists.","user":{"login":"jmfederico","id":237977,"node_id":"MDQ6VXNlcjIzNzk3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/237977?v=4","gravatar_id":"","url":"https://api.github.com/users/jmfederico","html_url":"https://github.com/jmfederico","followers_url":"https://api.github.com/users/jmfederico/followers","following_url":"https://api.github.com/users/jmfederico/following{/other_user}","gists_url":"https://api.github.com/users/jmfederico/gists{/gist_id}","starred_url":"https://api.github.com/users/jmfederico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmfederico/subscriptions","organizations_url":"https://api.github.com/users/jmfederico/orgs","repos_url":"https://api.github.com/users/jmfederico/repos","events_url":"https://api.github.com/users/jmfederico/events{/privacy}","received_events_url":"https://api.github.com/users/jmfederico/received_events","type":"User","site_admin":false},"body":"For background on why I created this read #8366 and #8077\r\n\r\nI noticed that there is no way to set constants in SilverStripe before the constants.php file is loaded by autoload.php reliably. Altering index.php is not a good idea, since there are more entry points to SilverStripe (like [sake](https://docs.silverstripe.org/en/4/developer_guides/cli/#sake-silverstripe-make))\r\n\r\nThe simples solution with no backward compatibility issues that I could see is to load a custom file before loading autoload.php if it exists (bootstrap.php seemed like a good name to me).\r\n\r\nThis needs to be changed in two places. In this repo (which this PR does) and the in the [index.php](https://github.com/silverstripe/recipe-core/blob/4/public/index.php) file of [SilverStripe - Recipe Core](https://github.com/silverstripe/recipe-core/).\r\n\r\nIf you think this is useful, I will create a PR in [SilverStripe - Recipe Core](https://github.com/silverstripe/recipe-core/).\r\n\r\nAlso, documentation should be updated, but I am not sure where it should go.","created_at":"2018-09-08T23:58:54Z","updated_at":"2018-09-09T03:26:01Z","closed_at":"2018-09-09T03:26:01Z","merged_at":null,"merge_commit_sha":"e4147df7f369b22b4087e7409e8790fb3856e4f0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/8367/commits","review_comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/8367/comments","review_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/8367/comments","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/69a1af12e226692355e48b1e3723f1635a6f2b4d","head":{"label":"jmfederico:4","ref":"4","sha":"69a1af12e226692355e48b1e3723f1635a6f2b4d","user":{"login":"jmfederico","id":237977,"node_id":"MDQ6VXNlcjIzNzk3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/237977?v=4","gravatar_id":"","url":"https://api.github.com/users/jmfederico","html_url":"https://github.com/jmfederico","followers_url":"https://api.github.com/users/jmfederico/followers","following_url":"https://api.github.com/users/jmfederico/following{/other_user}","gists_url":"https://api.github.com/users/jmfederico/gists{/gist_id}","starred_url":"https://api.github.com/users/jmfederico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmfederico/subscriptions","organizations_url":"https://api.github.com/users/jmfederico/orgs","repos_url":"https://api.github.com/users/jmfederico/repos","events_url":"https://api.github.com/users/jmfederico/events{/privacy}","received_events_url":"https://api.github.com/users/jmfederico/received_events","type":"User","site_admin":false},"repo":{"id":147977760,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc5Nzc3NjA=","name":"silverstripe-framework","full_name":"jmfederico/silverstripe-framework","owner":{"login":"jmfederico","id":237977,"node_id":"MDQ6VXNlcjIzNzk3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/237977?v=4","gravatar_id":"","url":"https://api.github.com/users/jmfederico","html_url":"https://github.com/jmfederico","followers_url":"https://api.github.com/users/jmfederico/followers","following_url":"https://api.github.com/users/jmfederico/following{/other_user}","gists_url":"https://api.github.com/users/jmfederico/gists{/gist_id}","starred_url":"https://api.github.com/users/jmfederico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmfederico/subscriptions","organizations_url":"https://api.github.com/users/jmfederico/orgs","repos_url":"https://api.github.com/users/jmfederico/repos","events_url":"https://api.github.com/users/jmfederico/events{/privacy}","received_events_url":"https://api.github.com/users/jmfederico/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmfederico/silverstripe-framework","description":"SilverStripe Framework, the MVC framework that powers SilverStripe CMS","fork":true,"url":"https://api.github.com/repos/jmfederico/silverstripe-framework","forks_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/forks","keys_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/teams","hooks_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/hooks","issue_events_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/issues/events{/number}","events_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/events","assignees_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/assignees{/user}","branches_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/branches{/branch}","tags_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/tags","blobs_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/languages","stargazers_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/stargazers","contributors_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/contributors","subscribers_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/subscribers","subscription_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/subscription","commits_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/contents/{+path}","compare_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/merges","archive_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/downloads","issues_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/issues{/number}","pulls_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/labels{/name}","releases_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/releases{/id}","deployments_url":"https://api.github.com/repos/jmfederico/silverstripe-framework/deployments","created_at":"2018-09-08T23:37:30Z","updated_at":"2018-09-08T23:47:29Z","pushed_at":"2018-09-08T23:47:27Z","git_url":"git://github.com/jmfederico/silverstripe-framework.git","ssh_url":"git@github.com:jmfederico/silverstripe-framework.git","clone_url":"https://github.com/jmfederico/silverstripe-framework.git","svn_url":"https://github.com/jmfederico/silverstripe-framework","homepage":"http://silverstripe.org/","size":100889,"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":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"4"}},"base":{"label":"silverstripe:4","ref":"4","sha":"373a8afeb55ceee86ed5092606aa606b8e5d723a","user":{"login":"silverstripe","id":379348,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTM0OA==","avatar_url":"https://avatars0.githubusercontent.com/u/379348?v=4","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"repo":{"id":1318892,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE4ODky","name":"silverstripe-framework","full_name":"silverstripe/silverstripe-framework","owner":{"login":"silverstripe","id":379348,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTM0OA==","avatar_url":"https://avatars0.githubusercontent.com/u/379348?v=4","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silverstripe/silverstripe-framework","description":"SilverStripe Framework, the MVC framework that powers SilverStripe CMS","fork":false,"url":"https://api.github.com/repos/silverstripe/silverstripe-framework","forks_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/forks","keys_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/teams","hooks_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/hooks","issue_events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/events","assignees_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/tags","blobs_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/languages","stargazers_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/stargazers","contributors_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/contributors","subscribers_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/subscribers","subscription_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/subscription","commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/merges","archive_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/downloads","issues_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/releases{/id}","deployments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/deployments","created_at":"2011-02-02T02:04:13Z","updated_at":"2018-09-06T11:27:07Z","pushed_at":"2018-09-08T23:58:55Z","git_url":"git://github.com/silverstripe/silverstripe-framework.git","ssh_url":"git@github.com:silverstripe/silverstripe-framework.git","clone_url":"https://github.com/silverstripe/silverstripe-framework.git","svn_url":"https://github.com/silverstripe/silverstripe-framework","homepage":"http://silverstripe.org/","size":100890,"stargazers_count":604,"watchers_count":604,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":708,"mirror_url":null,"archived":false,"open_issues_count":523,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":708,"open_issues":523,"watchers":604,"default_branch":"4"}},"_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/8367"},"html":{"href":"https://github.com/silverstripe/silverstripe-framework/pull/8367"},"issue":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/8367"},"comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/8367/comments"},"review_comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/8367/comments"},"review_comment":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/8367/commits"},"statuses":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/69a1af12e226692355e48b1e3723f1635a6f2b4d"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":6,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"jmfederico"}}