diff --git a/.divinerconfig b/.divinerconfig index c765720f12..88c73c168f 100644 --- a/.divinerconfig +++ b/.divinerconfig @@ -14,6 +14,10 @@ "aphront" : "Aphront (Web Stack)", "console" : "DarkConsole (Debugging Console)", "storage" : "Storage" - } + }, + "engines" : [ + ["DivinerArticleEngine", {}], + ["DivinerXHPEngine", {}] + ] } diff --git a/src/storage/connection/base/AphrontDatabaseConnection.php b/src/storage/connection/base/AphrontDatabaseConnection.php index 150f43b960..5d7fd27e27 100644 --- a/src/storage/connection/base/AphrontDatabaseConnection.php +++ b/src/storage/connection/base/AphrontDatabaseConnection.php @@ -36,21 +36,15 @@ abstract class AphrontDatabaseConnection { abstract public function escapeStringForLikeClause($string); public function queryData($pattern/*, $arg, $arg, ... */) { - if (false) { - // Workaround for the HPHP workaround: ensure we include this module - // since we really are using the function. - queryfx($this, $pattern); - } - $args = func_get_args(); array_unshift($args, $this); - return hphp_workaround_call_user_func_array('queryfx_all', $args); + return call_user_func_array('queryfx_all', $args); } public function query($pattern/*, $arg, $arg, ... */) { $args = func_get_args(); array_unshift($args, $this); - return hphp_workaround_call_user_func_array('queryfx', $args); + return call_user_func_array('queryfx', $args); } // TODO: Probably need to reset these when we catch a connection exception diff --git a/src/storage/queryfx/queryfx.php b/src/storage/queryfx/queryfx.php index 91cb5bb376..6195d9c88e 100644 --- a/src/storage/queryfx/queryfx.php +++ b/src/storage/queryfx/queryfx.php @@ -20,14 +20,8 @@ * @group storage */ function queryfx(AphrontDatabaseConnection $conn, $sql/*, ... */) { - if (false) { - // Workaround for the HPHP workaround: ensure we include this module - // since we really are using the function. - qsprintf($conn, $sql); - } - $argv = func_get_args(); - $query = hphp_workaround_call_user_func_array('qsprintf', $argv); + $query = call_user_func_array('qsprintf', $argv); $conn->executeRawQuery($query); } @@ -36,7 +30,7 @@ function queryfx(AphrontDatabaseConnection $conn, $sql/*, ... */) { */ function vqueryfx($conn, $sql, $argv) { array_unshift($argv, $conn, $sql); - hphp_workaround_call_user_func_array('queryfx', $argv); + call_user_func_array('queryfx', $argv); } /** @@ -44,7 +38,7 @@ function vqueryfx($conn, $sql, $argv) { */ function queryfx_all($conn, $sql/*, ... */) { $argv = func_get_args(); - hphp_workaround_call_user_func_array('queryfx', $argv); + call_user_func_array('queryfx', $argv); return $conn->selectAllResults(); } @@ -53,7 +47,7 @@ function queryfx_all($conn, $sql/*, ... */) { */ function queryfx_one($conn, $sql/*, ... */) { $argv = func_get_args(); - $ret = hphp_workaround_call_user_func_array('queryfx_all', $argv); + $ret = call_user_func_array('queryfx_all', $argv); if (count($ret) > 1) { throw new AphrontQueryCountException( 'Query returned more than one row.'); @@ -65,6 +59,6 @@ function queryfx_one($conn, $sql/*, ... */) { function vqueryfx_all($conn, $sql, array $argv) { array_unshift($argv, $conn, $sql); - hphp_workaround_call_user_func_array('queryfx', $argv); + call_user_func_array('queryfx', $argv); return $conn->selectAllResults(); } diff --git a/webroot/index.php b/webroot/index.php index 37e22d8f3f..9960f30c71 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -176,12 +176,3 @@ function phabricator_fatal_config_error($msg) { die(); } - -/** - * Workaround for HipHop bug, see Facebook Task #503624. - */ -function hphp_workaround_call_user_func_array($func, array $array) { - $f = new ReflectionFunction($func); - return $f->invokeArgs($array); -} -