diff --git a/src/applications/diffusion/request/git/DiffusionGitRequest.php b/src/applications/diffusion/request/git/DiffusionGitRequest.php index 82b244ea38..2232cb1996 100644 --- a/src/applications/diffusion/request/git/DiffusionGitRequest.php +++ b/src/applications/diffusion/request/git/DiffusionGitRequest.php @@ -62,7 +62,7 @@ class DiffusionGitRequest extends DiffusionRequest { $this->commit); // Beyond verifying them, expand commit short forms to full 40-character - // sha1s. + // hashes. $this->commit = trim($commit); // If we have a commit, overwrite the branch commit with the more diff --git a/src/storage/connection/isolated/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php b/src/storage/connection/isolated/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php index dbed341c2f..e92aef2150 100644 --- a/src/storage/connection/isolated/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php +++ b/src/storage/connection/isolated/__tests__/AphrontIsolatedDatabaseConnectionTestCase.php @@ -31,7 +31,7 @@ class AphrontIsolatedDatabaseConnectionTestCase public function testIsolation() { $conn = $this->newIsolatedConnection(); - $test_phid = 'PHID-TEST-'.sha1(mt_rand()); + $test_phid = 'PHID-TEST-'.Filesystem::readRandomCharacters(20); queryfx( $conn, diff --git a/src/storage/connection/isolated/__tests__/__init__.php b/src/storage/connection/isolated/__tests__/__init__.php index ce36833299..01b64ad096 100644 --- a/src/storage/connection/isolated/__tests__/__init__.php +++ b/src/storage/connection/isolated/__tests__/__init__.php @@ -11,6 +11,7 @@ phutil_require_module('phabricator', 'infrastructure/testing/testcase'); phutil_require_module('phabricator', 'storage/connection/isolated'); phutil_require_module('phabricator', 'storage/queryfx'); +phutil_require_module('phutil', 'filesystem'); phutil_require_module('phutil', 'utils');