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:
epriestley
2011-10-01 08:59:42 -07:00
parent ceceb47033
commit e4e5c39457
18 changed files with 35 additions and 20 deletions

View File

@@ -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';
}
}

View File

@@ -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');

View File

@@ -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();