32 files changed +46
-138
lines changed Original file line number Diff line number Diff line change 42
42
? $ _SERVER ['PHABRICATOR_ENV ' ]
43
43
: getenv ('PHABRICATOR_ENV ' );
44
44
if (!$ env ) {
45
- phutil_require_module ('phutil ' , 'console ' );
46
45
echo phutil_console_wrap (
47
46
phutil_console_format (
48
47
"**ERROR**: PHABRICATOR_ENV Not Set \n\n" .
59
58
$ conf = phabricator_read_config_file ($ env );
60
59
$ conf ['phabricator.env ' ] = $ env ;
61
60
62
- phutil_require_module ('phabricator ' , 'infrastructure/env ' );
63
61
PhabricatorEnv::setEnvConfig ($ conf );
64
62
65
63
phutil_load_library ('arcanist/src ' );
Original file line number Diff line number Diff line change 155
155
exit (1 );
156
156
}
157
157
158
- phutil_require_module ('phutil ' , 'filesystem ' );
159
- phutil_require_module ('phutil ' , 'filesystem/filefinder ' );
160
- phutil_require_module ('phutil ' , 'future/exec ' );
161
- phutil_require_module ('phutil ' , 'parser/docblock ' );
162
-
163
158
$ root = Filesystem::resolvePath ($ argv [1 ]);
164
159
165
160
$ resource_hash = PhabricatorEnv::getEnvConfig ('celerity.resource-hash ' );
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
-
25
23
$ time_start = microtime (true );
26
24
27
25
if ($ argc !== 3 ) {
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phabricator ' , 'infrastructure/daemon/control ' );
24
23
$ control = new PhabricatorDaemonControl ();
25
24
26
25
must_have_extension ('pcntl ' );
@@ -208,10 +207,6 @@ function must_have_extension($ext) {
208
207
}
209
208
210
209
function phd_load_tracked_repositories () {
211
- phutil_require_module (
212
- 'phabricator ' ,
213
- 'applications/repository/storage/repository ' );
214
-
215
210
$ repositories = id (new PhabricatorRepository ())->loadAll ();
216
211
foreach ($ repositories as $ key => $ repository ) {
217
212
if (!$ repository ->isTracked ()) {
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
-
25
23
$ revision = new DifferentialRevision ();
26
24
27
25
$ empty_revisions = queryfx_all (
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
- phutil_require_module ('phutil ' , 'future/exec ' );
25
-
26
23
PhutilServiceProfiler::installEchoListener ();
27
24
28
25
$ allocator = new DrydockAllocator ();
Original file line number Diff line number Diff line change 2
2
<?php
3
3
4
4
/*
5
- * Copyright 2011 Facebook, Inc.
5
+ * Copyright 2012 Facebook, Inc.
6
6
*
7
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
8
* you may not use this file except in compliance with the License.
25
25
require_once $ root .'/scripts/__init_script__.php ' ;
26
26
require_once $ root .'/externals/mimemailparser/MimeMailParser.class.php ' ;
27
27
28
- phutil_require_module (
29
- 'phabricator ' ,
30
- 'applications/metamta/storage/receivedmail ' );
31
- phutil_require_module (
32
- 'phabricator ' ,
33
- 'applications/files/storage/file ' );
34
-
35
28
$ parser = new MimeMailParser ();
36
29
$ parser ->setText (file_get_contents ('php://stdin ' ));
37
30
Original file line number Diff line number Diff line change 2
2
<?php
3
3
4
4
/*
5
- * Copyright 2011 Facebook, Inc.
5
+ * Copyright 2012 Facebook, Inc.
6
6
*
7
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
8
* you may not use this file except in compliance with the License.
20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'symbols ' );
24
- PhutilSymbolLoader::loadClass ('PhabricatorRepository ' );
25
- PhutilSymbolLoader::loadClass ('PhabricatorRepositoryCommit ' );
26
-
27
23
$ commit = new PhabricatorRepositoryCommit ();
28
24
29
25
$ conn_w = id (new PhabricatorRepository ())->establishConnection ('w ' );
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
-
25
23
$ is_all = false ;
26
24
$ reparse_message = false ;
27
25
$ reparse_change = false ;
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
- phutil_require_module ('phutil ' , 'future/exec ' );
25
-
26
23
if (empty ($ argv [1 ])) {
27
24
echo "usage: test_connection.php <repository_callsign> \n" ;
28
25
exit (1 );
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
-
25
23
if (ctags_check_executable () == false ) {
26
24
echo phutil_console_format (
27
25
"Could not find Exuberant ctags. Make sure it is installed and \n" .
Original file line number Diff line number Diff line change 2
2
<?php
3
3
4
4
/*
5
- * Copyright 2011 Facebook, Inc.
5
+ * Copyright 2012 Facebook, Inc.
6
6
*
7
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
8
* you may not use this file except in compliance with the License.
20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
- phutil_require_module ('phutil ' , 'parser/xhpast/bin ' );
25
-
26
23
if ($ argc !== 1 || posix_isatty (STDIN )) {
27
24
echo phutil_console_format (
28
25
"usage: find . -type f -name '*.php' | ./generate_php_symbols.php \n" );
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
- phutil_require_module ('phutil ' , 'future/exec ' );
25
-
26
23
echo "Enter a username to create a new account or edit an existing account. " ;
27
24
28
25
$ username = phutil_console_prompt ("Enter a username: " );
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
- phutil_require_module ('phutil ' , 'future/exec ' );
25
-
26
23
if ($ argc !== 5 ) {
27
24
echo "usage: add_user.php <username> <email> <realname> <admin_user> \n" ;
28
25
exit (1 );
Original file line number Diff line number Diff line change 20
20
$ root = dirname (dirname (dirname (__FILE__ )));
21
21
require_once $ root .'/scripts/__init_script__.php ' ;
22
22
23
- phutil_require_module ('phutil ' , 'console ' );
24
- phutil_require_module ('phabricator ' , 'storage/queryfx ' );
25
-
26
23
$ purge_changesets = false ;
27
24
$ purge_differential = false ;
28
25
$ purge_maniphest = false ;
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ final public function buildController() {
74
74
return $ this ->build404Controller ();
75
75
}
76
76
77
- PhutilSymbolLoader::loadClass ($ controller_class );
78
77
$ controller = newv ($ controller_class , array ($ request ));
79
78
80
79
return array ($ controller , $ uri_data );
Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ public static function stopProfiler() {
70
70
$ data = xhprof_disable ();
71
71
$ data = serialize ($ data );
72
72
$ file_class = 'PhabricatorFile ' ;
73
- PhutilSymbolLoader::loadClass ($ file_class );
74
73
75
74
// Since these happen on GET we can't do guarded writes.
76
75
$ unguarded = AphrontWriteGuard::beginScopedUnguardedWrites ();
Original file line number Diff line number Diff line change @@ -155,7 +155,6 @@ public static function newProvider($which) {
155
155
default :
156
156
throw new Exception ('Unknown OAuth provider. ' );
157
157
}
158
- PhutilSymbolLoader::loadClass ($ class );
159
158
return newv ($ class , array ());
160
159
}
161
160
Original file line number Diff line number Diff line change @@ -63,9 +63,8 @@ final public function willBeginExecution() {
63
63
$ request ->setUser ($ user );
64
64
65
65
if ($ user ->getIsDisabled () && $ this ->shouldRequireEnabledUser ()) {
66
- $ disabled_user_controller = newv (
67
- 'PhabricatorDisabledUserController ' ,
68
- array ($ request ));
66
+ $ disabled_user_controller = new PhabricatorDisabledUserController (
67
+ $ request );
69
68
return $ this ->delegateToController ($ disabled_user_controller );
70
69
}
71
70
@@ -78,7 +77,7 @@ final public function willBeginExecution() {
78
77
}
79
78
80
79
if ($ this ->shouldRequireLogin () && !$ user ->getPHID ()) {
81
- $ login_controller = newv ( ' PhabricatorLoginController ' , array ($ request) );
80
+ $ login_controller = new PhabricatorLoginController ($ request );
82
81
return $ this ->delegateToController ($ login_controller );
83
82
}
84
83
@@ -89,9 +88,7 @@ final public function willBeginExecution() {
89
88
"No primary email address associated with this account! " );
90
89
}
91
90
if (!$ email ->getIsVerified ()) {
92
- $ verify_controller = newv (
93
- 'PhabricatorMustVerifyEmailController ' ,
94
- array ($ request ));
91
+ $ verify_controller = new PhabricatorMustVerifyEmailController ($ request );
95
92
return $ this ->delegateToController ($ verify_controller );
96
93
}
97
94
}
Original file line number Diff line number Diff line change @@ -227,7 +227,6 @@ public function processRequest() {
227
227
228
228
// TODO: build a better version of the action links and deprecate the
229
229
// whole DifferentialRevisionDetailRenderer class.
230
- PhutilSymbolLoader::loadClass ($ custom_renderer_class );
231
230
$ custom_renderer =
232
231
newv ($ custom_renderer_class , array ());
233
232
$ actions = array_merge (
Original file line number Diff line number Diff line change @@ -51,18 +51,15 @@ final public static function newFromDiffusionRequest(
51
51
52
52
switch ($ repository ->getVersionControlSystem ()) {
53
53
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT :
54
- $ class = ' DiffusionGitBranchQuery ' ;
54
+ $ query = new DiffusionGitBranchQuery () ;
55
55
break ;
56
56
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL :
57
- $ class = ' DiffusionMercurialBranchQuery ' ;
57
+ $ query = new DiffusionMercurialBranchQuery () ;
58
58
break ;
59
59
default :
60
60
throw new Exception ("Unsupported VCS! " );
61
61
}
62
62
63
- PhutilSymbolLoader::loadClass ($ class );
64
- $ query = new $ class ();
65
-
66
63
$ query ->request = $ request ;
67
64
68
65
return $ query ;
Original file line number Diff line number Diff line change @@ -44,21 +44,18 @@ final public static function newFromDiffusionRequest(
44
44
switch ($ repository ->getVersionControlSystem ()) {
45
45
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT :
46
46
// TODO: Verify local-path?
47
- $ class = ' DiffusionGitBrowseQuery ' ;
47
+ $ query = new DiffusionGitBrowseQuery () ;
48
48
break ;
49
49
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL :
50
- $ class = ' DiffusionMercurialBrowseQuery ' ;
50
+ $ query = new DiffusionMercurialBrowseQuery () ;
51
51
break ;
52
52
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN :
53
- $ class = ' DiffusionSvnBrowseQuery ' ;
53
+ $ query = new DiffusionSvnBrowseQuery () ;
54
54
break ;
55
55
default :
56
56
throw new Exception ("Unsupported VCS! " );
57
57
}
58
58
59
- PhutilSymbolLoader::loadClass ($ class );
60
- $ query = new $ class ();
61
-
62
59
$ query ->request = $ request ;
63
60
64
61
return $ query ;
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ private function getBucketName() {
106
106
* Create a new S3 API object.
107
107
*
108
108
* @task internal
109
+ * @phutil-external-symbol class S3
109
110
*/
110
111
private function newS3API () {
111
112
$ libroot = dirname (phutil_get_library_root ('phabricator ' ));
@@ -119,13 +120,7 @@ private function newS3API() {
119
120
"Specify 'amazon-s3.access-key' and 'amazon-s3.secret-key'! " );
120
121
}
121
122
122
- $ s3 = newv (
123
- 'S3 ' ,
124
- array (
125
- $ access_key ,
126
- $ secret_key ,
127
- $ use_ssl = true ,
128
- ));
123
+ $ s3 = new S3 ($ access_key , $ secret_key , $ use_ssl = true );
129
124
130
125
$ s3 ->setExceptions (true );
131
126
Original file line number Diff line number Diff line change @@ -118,7 +118,6 @@ private static function newMarkupEngine(array $options) {
118
118
$ custom_rule_classes = $ options ['custom-inline ' ];
119
119
if ($ custom_rule_classes ) {
120
120
foreach ($ custom_rule_classes as $ custom_rule_class ) {
121
- PhutilSymbolLoader::loadClass ($ custom_rule_class );
122
121
$ rules [] = newv ($ custom_rule_class , array ());
123
122
}
124
123
}
@@ -167,7 +166,6 @@ private static function newMarkupEngine(array $options) {
167
166
$ custom_block_rule_classes = $ options ['custom-block ' ];
168
167
if ($ custom_block_rule_classes ) {
169
168
foreach ($ custom_block_rule_classes as $ custom_block_rule_class ) {
170
- PhutilSymbolLoader::loadClass ($ custom_block_rule_class );
171
169
$ blocks [] = newv ($ custom_block_rule_class , array ());
172
170
}
173
171
}
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ public function supportsMessageIDHeader() {
33
33
return false ;
34
34
}
35
35
36
+ /**
37
+ * @phutil-external-symbol class SimpleEmailService
38
+ */
36
39
public function executeSend ($ body ) {
37
40
$ key = PhabricatorEnv::getEnvConfig ('amazon-ses.access-key ' );
38
41
$ secret = PhabricatorEnv::getEnvConfig ('amazon-ses.secret-key ' );
@@ -41,7 +44,7 @@ public function executeSend($body) {
41
44
$ root = dirname ($ root );
42
45
require_once $ root .'/externals/amazon-ses/ses.php ' ;
43
46
44
- $ service = newv ( ' SimpleEmailService ' , array ($ key , $ secret) );
47
+ $ service = new SimpleEmailService ($ key , $ secret );
45
48
$ service ->enableUseExceptions (true );
46
49
return $ service ->sendRawEmail ($ body );
47
50
}
Original file line number Diff line number Diff line change 22
22
class PhabricatorMailImplementationPHPMailerLiteAdapter
23
23
extends PhabricatorMailImplementationAdapter {
24
24
25
+ /**
26
+ * @phutil-external-symbol class PHPMailerLite
27
+ */
25
28
public function __construct () {
26
29
$ root = phutil_get_library_root ('phabricator ' );
27
30
$ root = dirname ($ root );
28
31
require_once $ root .'/externals/phpmailer/class.phpmailer-lite.php ' ;
29
- $ this ->mailer = newv ( ' PHPMailerLite ' , array ($ use_exceptions = true ) );
32
+ $ this ->mailer = new PHPMailerLite ($ use_exceptions = true );
30
33
$ this ->mailer ->CharSet = 'utf-8 ' ;
31
34
}
32
35
Original file line number Diff line number Diff line change @@ -233,13 +233,13 @@ public static function loadReceiverObject($receiver_name) {
233
233
$ class_obj = null ;
234
234
switch ($ receiver_type ) {
235
235
case 'T ' :
236
- $ class_obj = newv ( ' ManiphestTask ' , array () );
236
+ $ class_obj = new ManiphestTask ( );
237
237
break ;
238
238
case 'D ' :
239
- $ class_obj = newv ( ' DifferentialRevision ' , array () );
239
+ $ class_obj = new DifferentialRevision ( );
240
240
break ;
241
241
case 'C ' :
242
- $ class_obj = newv ( ' PhabricatorRepositoryCommit ' , array () );
242
+ $ class_obj = new PhabricatorRepositoryCommit ( );
243
243
break ;
244
244
default :
245
245
return null ;
0 commit comments