Merge __init_env__.php into __init_script__.php
Summary: There are currently two files, but all scripts require both of them, which is clearly silly. In the longer term I want to rewrite all of this init stuff to be more structured (e.g., merge webroot/index.php and __init_script__ better) but this reduces the surface area of the ad-hoc "include files" API we have now, at least. Test Plan: - Grepped for __init_env__.php (no hits) - Ran a unit test (to test unit changes) - Ran a daemon (to test daemon changes) Reviewers: jungejason, nh, tuomaspelkonen, aran Reviewed By: jungejason CC: aran, jungejason Differential Revision: 976
This commit is contained in:
@@ -30,9 +30,6 @@ abstract class PhabricatorDaemon extends PhutilDaemon {
|
||||
|
||||
$phabricator = phutil_get_library_root('phabricator');
|
||||
$root = dirname($phabricator);
|
||||
require_once $root.'/scripts/__init_env__.php';
|
||||
|
||||
// Daemons may perform writes.
|
||||
AphrontWriteGuard::allowDangerousUnguardedWrites(true);
|
||||
require_once $root.'/scripts/__init_script__.php';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
phutil_require_module('phabricator', 'aphront/console/plugin/errorlog/api');
|
||||
phutil_require_module('phabricator', 'aphront/console/plugin/event/api');
|
||||
phutil_require_module('phabricator', 'aphront/writeguard');
|
||||
|
||||
phutil_require_module('phutil', 'daemon/base');
|
||||
phutil_require_module('phutil', 'moduleutils');
|
||||
|
||||
@@ -44,7 +44,7 @@ abstract class PhabricatorTestCase extends ArcanistPhutilTestCase {
|
||||
|
||||
protected function willRunTests() {
|
||||
$root = dirname(phutil_get_library_root('phabricator'));
|
||||
require_once $root.'/scripts/__init_env__.php';
|
||||
require_once $root.'/scripts/__init_script__.php';
|
||||
|
||||
$config = $this->getComputedConfiguration();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user