From 1ee7b3ab8cbb49613339b0f8b02b9f91a069a102 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 7 Oct 2017 04:59:29 -0700 Subject: [PATCH 01/11] Correct "bin/storage dump" command construction with passwords Fixes T13004. This should mirror the other branch. --- .../workflow/PhabricatorStorageManagementDumpWorkflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php index fecc0517e3..dced62eee9 100644 --- a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php +++ b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php @@ -201,7 +201,7 @@ final class PhabricatorStorageManagementDumpWorkflow } if ($has_password) { - $commands[] = csprintf( + $command = csprintf( 'mysqldump -p%P %Ls -- %R %R', $password, $target_argv, From 4fd9d2d4bbdb8fb7013b5bea5e0a5ec121db526f Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 7 Oct 2017 13:23:18 -0700 Subject: [PATCH 02/11] Fix "bin/storage dump" with no "--output" Ref T13004. (I distinctly remember testing this, but must have tweaked things afterward.) --- .../workflow/PhabricatorStorageManagementDumpWorkflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php index dced62eee9..17491d55e9 100644 --- a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php +++ b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php @@ -237,7 +237,7 @@ final class PhabricatorStorageManagementDumpWorkflow $file = fopen($output_file, 'wb'); } - if (!$file) { + if (($output_file !== null) && !$file) { throw new Exception( pht( 'Failed to open file "%s" for writing.', From 9bd6a3705559b16c75595a06d9d726274bd5be6d Mon Sep 17 00:00:00 2001 From: Dmitri Iouchtchenko Date: Mon, 9 Oct 2017 10:48:01 -0700 Subject: [PATCH 03/11] Fix spelling Summary: Noticed a couple of typos in the docs, and then things got out of hand. Test Plan: - Stared at the words until my eyes watered and the letters began to swim on the screen. - Consulted a dictionary. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, yelirekim, PHID-OPKG-gm6ozazyms6q6i22gyam Differential Revision: https://secure.phabricator.com/D18693 --- scripts/setup/manage_garbage.php | 2 +- .../httpparametertype/AphrontHTTPParameterType.php | 2 +- .../almanac/editor/AlmanacDeviceEditor.php | 2 +- .../audit/view/PhabricatorAuditListView.php | 2 +- .../auth/controller/PhabricatorAuthController.php | 2 +- .../controller/PhabricatorAuthRegisterController.php | 2 +- .../auth/editor/PhabricatorAuthSSHKeyEditor.php | 2 +- .../factor/__tests__/PhabricatorAuthInviteTestCase.php | 2 +- .../PhabricatorAuthManagementRevokeWorkflow.php | 2 +- .../auth/provider/PhabricatorOAuth1AuthProvider.php | 2 +- src/applications/base/PhabricatorApplication.php | 2 +- .../base/controller/PhabricatorController.php | 2 +- .../editor/PhabricatorCalendarImportEditEngine.php | 2 +- .../calendar/icon/PhabricatorCalendarIconSet.php | 2 +- src/applications/calendar/util/CalendarTimeUtil.php | 2 +- .../PhabricatorCalendarEventFrequencyTransaction.php | 4 ++-- .../PhabricatorCalendarEventInviteTransaction.php | 4 ++-- .../PhabricatorCalendarImportFrequencyTransaction.php | 2 +- .../config/check/PhabricatorStorageSetupCheck.php | 2 +- .../conpherence/query/ConpherenceThreadQuery.php | 2 +- .../PhabricatorDashboardPanelTabsCustomField.php | 2 +- .../differential/controller/DifferentialController.php | 2 +- .../customfield/DifferentialHarbormasterField.php | 2 +- .../differential/editor/DifferentialDiffEditor.php | 2 +- .../parser/DifferentialChangesetParser.php | 6 +++--- .../differential/storage/DifferentialModernHunk.php | 2 +- .../differential/storage/DifferentialRevision.php | 4 ++-- ...DifferentialResponsibleViewerFunctionDatasource.php | 2 +- .../diffusion/controller/DiffusionCommitController.php | 2 +- .../diffusion/editor/DiffusionRepositoryEditEngine.php | 6 +++--- .../diffusion/engine/DiffusionCommitHookEngine.php | 2 +- .../gitlfs/DiffusionGitLFSAuthenticateWorkflow.php | 2 +- .../diffusion/herald/HeraldCommitAdapter.php | 2 +- .../diffusion/protocol/DiffusionCommandEngine.php | 2 +- .../protocol/DiffusionMercurialWireProtocol.php | 2 +- .../protocol/DiffusionRepositoryClusterEngine.php | 4 ++-- .../query/DiffusionCachedResolveRefsQuery.php | 2 +- .../diffusion/query/DiffusionCommitQuery.php | 2 +- .../xaction/DiffusionCommitConcernTransaction.php | 2 +- .../xaction/DiffusionCommitVerifyTransaction.php | 2 +- .../blueprint/DrydockBlueprintImplementation.php | 4 ++-- .../drydock/storage/DrydockAuthorization.php | 2 +- .../drydock/worker/DrydockLeaseUpdateWorker.php | 6 +++--- src/applications/drydock/worker/DrydockWorker.php | 2 +- .../files/controller/PhabricatorFileDataController.php | 2 +- .../PhabricatorFilesManagementCatWorkflow.php | 2 +- .../fund/editor/FundInitiativeEditEngine.php | 2 +- .../HarbormasterSendMessageConduitAPIMethod.php | 4 ++-- .../storage/configuration/HarbormasterBuildStep.php | 2 +- .../controller/LegalpadDocumentSignController.php | 2 +- .../maniphest/controller/ManiphestReportController.php | 4 ++-- .../maniphest/editor/ManiphestTransactionEditor.php | 2 +- .../PhabricatorMailManagementUnverifyWorkflow.php | 2 +- .../metamta/receiver/PhabricatorMailReceiver.php | 2 +- .../__tests__/PhabricatorOwnersPackageTestCase.php | 2 +- .../credentialtype/PassphraseCredentialType.php | 2 +- .../PassphraseSSHPrivateKeyTextCredentialType.php | 2 +- .../passphrase/view/PassphraseCredentialControl.php | 2 +- .../people/markup/PhabricatorMentionRemarkupRule.php | 2 +- .../people/query/PhabricatorPeopleQuery.php | 4 ++-- .../people/query/PhabricatorPeopleSearchEngine.php | 2 +- src/applications/people/storage/PhabricatorUser.php | 6 +++--- .../phid/handle/pool/PhabricatorHandleList.php | 2 +- .../phid/resolver/PhabricatorPHIDResolver.php | 2 +- .../provider/PhortuneStripePaymentProvider.php | 2 +- .../phrequent/storage/PhrequentTimeBlock.php | 2 +- .../phriction/editor/PhrictionTransactionEditor.php | 2 +- .../policy/filter/PhabricatorPolicyFilter.php | 2 +- .../project/query/PhabricatorProjectColumnQuery.php | 2 +- .../project/remarkup/ProjectRemarkupRule.php | 2 +- .../DifferentialReleephRequestFieldSpecification.php | 2 +- .../field/selector/ReleephDefaultFieldSelector.php | 2 +- .../daemon/PhabricatorMercurialGraphStream.php | 2 +- .../data/PhabricatorRepositoryURINormalizer.php | 4 ++-- .../engine/PhabricatorRepositoryDiscoveryEngine.php | 2 +- .../PhabricatorRepositoryManagementThawWorkflow.php | 2 +- .../repository/storage/PhabricatorRepository.php | 4 ++-- .../repository/storage/PhabricatorRepositoryURI.php | 2 +- .../PhabricatorRepositoryWorkingCopyVersion.php | 2 +- ...atorRepositoryMercurialCommitChangeParserWorker.php | 2 +- .../engine/PhabricatorApplicationSearchEngine.php | 2 +- .../management/PhabricatorSearchManagementWorkflow.php | 2 +- .../menuitem/PhabricatorMotivatorProfileMenuItem.php | 4 ++-- .../settings/panel/PhabricatorSettingsPanel.php | 2 +- .../settings/query/PhabricatorUserPreferencesQuery.php | 2 +- .../settings/setting/PhabricatorTimezoneSetting.php | 2 +- .../PhabricatorSubscriptionsEditController.php | 2 +- .../transactions/editengine/PhabricatorEditEngine.php | 4 ++-- .../editor/PhabricatorApplicationTransactionEditor.php | 2 +- .../datasource/PhabricatorTypeaheadDatasource.php | 2 +- .../uiexample/examples/PhabricatorStatusUIExample.php | 2 +- src/docs/contributor/cla.diviner | 6 +++--- src/docs/contributor/describing_problems.diviner | 2 +- src/docs/contributor/internationalization.diviner | 2 +- src/docs/contributor/reproduction_steps.diviner | 4 ++-- src/docs/user/cluster/cluster.diviner | 2 +- src/docs/user/cluster/cluster_databases.diviner | 2 +- src/docs/user/cluster/cluster_devices.diviner | 2 +- src/docs/user/cluster/cluster_partitioning.diviner | 6 +++--- src/docs/user/cluster/cluster_repositories.diviner | 2 +- src/docs/user/cluster/cluster_search.diviner | 4 ++-- .../user/configuration/configuration_guide.diviner | 4 ++-- .../user/configuration/configuring_backups.diviner | 2 +- .../user/configuration/configuring_encryption.diviner | 4 ++-- src/docs/user/configuration/managing_garbage.diviner | 2 +- src/docs/user/field/conduit_changes.diviner | 2 +- src/docs/user/field/darkconsole.diviner | 2 +- src/docs/user/field/performance.diviner | 4 ++-- src/docs/user/field/repository_imports.diviner | 8 ++++---- src/docs/user/field/xhprof.diviner | 2 +- src/docs/user/userguide/almanac.diviner | 2 +- src/docs/user/userguide/arcanist.diviner | 2 +- src/docs/user/userguide/arcanist_lint.diviner | 2 +- src/docs/user/userguide/calendar_exports.diviner | 2 +- src/docs/user/userguide/calendar_imports.diviner | 2 +- src/docs/user/userguide/conduit_edit.diviner | 2 +- src/docs/user/userguide/diffusion_api.diviner | 2 +- src/docs/user/userguide/diffusion_hosting.diviner | 2 +- src/docs/user/userguide/diffusion_managing.diviner | 10 +++++----- src/docs/user/userguide/diffusion_uris.diviner | 4 ++-- src/docs/user/userguide/drydock.diviner | 2 +- src/docs/user/userguide/drydock_blueprints.diviner | 2 +- src/docs/user/userguide/drydock_security.diviner | 2 +- src/docs/user/userguide/forms.diviner | 2 +- src/docs/user/userguide/herald.diviner | 2 +- src/docs/user/userguide/jump.diviner | 2 +- src/docs/user/userguide/owners.diviner | 2 +- src/docs/user/userguide/projects.diviner | 2 +- src/docs/user/userguide/remarkup.diviner | 2 +- src/docs/user/userguide/search.diviner | 2 +- src/docs/user/userguide/spaces.diviner | 2 +- src/docs/user/userguide/users.diviner | 2 +- .../customfield/field/PhabricatorCustomFieldList.php | 2 +- .../workers/query/PhabricatorWorkerTriggerQuery.php | 4 ++-- src/infrastructure/diff/view/PHUIDiffGraphView.php | 2 +- .../diff/view/PHUIDiffInlineCommentTableScaffold.php | 2 +- src/infrastructure/env/PhabricatorEnv.php | 2 +- .../translation/PhabricatorUSEnglishTranslation.php | 6 +++--- .../policy/PhabricatorCursorPagedPolicyAwareQuery.php | 4 ++-- src/infrastructure/storage/lisk/LiskDAO.php | 2 +- .../storage/lisk/__tests__/LiskFixtureTestCase.php | 2 +- .../workflow/PhabricatorStorageManagementWorkflow.php | 4 ++-- src/infrastructure/util/PhabricatorHash.php | 2 +- .../util/password/PhabricatorPasswordHasher.php | 8 ++++---- src/view/AphrontView.php | 2 +- src/view/page/PhabricatorStandardPageView.php | 2 +- src/view/phui/PHUIHeaderView.php | 2 +- webroot/rsrc/css/phui/phui-document.css | 4 ++-- webroot/rsrc/css/phui/phui-header-view.css | 2 +- .../rsrc/js/application/conpherence/behavior-menu.js | 2 +- .../conpherence/behavior-participant-pane.js | 2 +- .../application/diffusion/DiffusionLocateFileSource.js | 2 +- .../js/application/pholio/behavior-pholio-mock-view.js | 2 +- webroot/rsrc/js/core/Prefab.js | 4 ++-- webroot/rsrc/js/core/behavior-device.js | 2 +- webroot/rsrc/js/phuix/PHUIXAutocomplete.js | 2 +- webroot/rsrc/js/phuix/PHUIXDropdownMenu.js | 2 +- 157 files changed, 204 insertions(+), 204 deletions(-) diff --git a/scripts/setup/manage_garbage.php b/scripts/setup/manage_garbage.php index ba727eab60..326730375e 100755 --- a/scripts/setup/manage_garbage.php +++ b/scripts/setup/manage_garbage.php @@ -5,7 +5,7 @@ $root = dirname(dirname(dirname(__FILE__))); require_once $root.'/scripts/__init_script__.php'; $args = new PhutilArgumentParser($argv); -$args->setTagline(pht('manage garbage colletors')); +$args->setTagline(pht('manage garbage collectors')); $args->setSynopsis(<<isImported()) { diff --git a/src/applications/auth/controller/PhabricatorAuthController.php b/src/applications/auth/controller/PhabricatorAuthController.php index c5b3c1ce99..0ed86e3056 100644 --- a/src/applications/auth/controller/PhabricatorAuthController.php +++ b/src/applications/auth/controller/PhabricatorAuthController.php @@ -134,7 +134,7 @@ abstract class PhabricatorAuthController extends PhabricatorController { // checks later on to make sure this account is valid for the intended // operation. This requires edit permission for completeness and consistency // but it won't actually be meaningfully checked because we're using the - // ominpotent user. + // omnipotent user. $account = id(new PhabricatorExternalAccountQuery()) ->setViewer(PhabricatorUser::getOmnipotentUser()) diff --git a/src/applications/auth/controller/PhabricatorAuthRegisterController.php b/src/applications/auth/controller/PhabricatorAuthRegisterController.php index a68e12c801..5a792dc864 100644 --- a/src/applications/auth/controller/PhabricatorAuthRegisterController.php +++ b/src/applications/auth/controller/PhabricatorAuthRegisterController.php @@ -79,7 +79,7 @@ final class PhabricatorAuthRegisterController } if ($default_email !== null) { - // We should bypass policy here becase e.g. limiting an application use + // We should bypass policy here because e.g. limiting an application use // to a subset of users should not allow the others to overwrite // configured application emails. $application_email = id(new PhabricatorMetaMTAApplicationEmailQuery()) diff --git a/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php b/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php index 0962b7b56a..1c40af5795 100644 --- a/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php +++ b/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php @@ -226,7 +226,7 @@ final class PhabricatorAuthSSHKeyEditor ->addHeader('Thread-Topic', $phid); // The primary value of this mail is alerting users to account compromises, - // so force delivery. In particular, this mail should still be delievered + // so force delivery. In particular, this mail should still be delivered // even if "self mail" is disabled. $mail->setForceDelivery(true); diff --git a/src/applications/auth/factor/__tests__/PhabricatorAuthInviteTestCase.php b/src/applications/auth/factor/__tests__/PhabricatorAuthInviteTestCase.php index 3906c5eabe..ce9151bcef 100644 --- a/src/applications/auth/factor/__tests__/PhabricatorAuthInviteTestCase.php +++ b/src/applications/auth/factor/__tests__/PhabricatorAuthInviteTestCase.php @@ -51,7 +51,7 @@ final class PhabricatorAuthInviteTestCase extends PhabricatorTestCase { $caught = $ex; } - // This first time should accept the invite and verify the addresss. + // This first time should accept the invite and verify the address. $this->assertTrue( ($caught instanceof PhabricatorAuthInviteRegisteredException)); diff --git a/src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php b/src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php index bb94cfca62..758761b2ca 100644 --- a/src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php +++ b/src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php @@ -74,7 +74,7 @@ final class PhabricatorAuthManagementRevokeWorkflow if (!strlen($from) && !$is_everywhere) { throw new PhutilArgumentUsageException( pht( - 'Specify the target to revoke credentals from with "--from" or '. + 'Specify the target to revoke credentials from with "--from" or '. 'specify "--everywhere".')); } else if (strlen($from) && $is_everywhere) { throw new PhutilArgumentUsageException( diff --git a/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php b/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php index 530bf30583..c62983de2f 100644 --- a/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php +++ b/src/applications/auth/provider/PhabricatorOAuth1AuthProvider.php @@ -270,7 +270,7 @@ abstract class PhabricatorOAuth1AuthProvider } private function getHandshakeTokenKeyFromClientCode($client_code) { - // NOTE: This is very slightly coersive since the TemporaryToken table + // NOTE: This is very slightly coercive since the TemporaryToken table // expects an "objectPHID" as an identifier, but nothing about the storage // is bound to PHIDs. diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index 72b577771f..c25612408c 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -108,7 +108,7 @@ abstract class PhabricatorApplication * * Launchable applications can be pinned to the home page, and show up in the * "Launcher" view of the Applications application. Making an application - * unlauncahble prevents pinning and hides it from this view. + * unlaunchable prevents pinning and hides it from this view. * * Usually, an application should be marked unlaunchable if: * diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php index 1ecfdaf557..f923eb7b73 100644 --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -552,7 +552,7 @@ abstract class PhabricatorController extends AphrontController { public function buildApplicationCrumbsForEditEngine() { - // TODO: This is kind of gross, I'm bascially just making this public so + // TODO: This is kind of gross, I'm basically just making this public so // I can use it in EditEngine. We could do this without making it public // by using controller delegation, or make it properly public. return $this->buildApplicationCrumbs(); diff --git a/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php b/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php index c3dc29bb51..90b4962ca9 100644 --- a/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php +++ b/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php @@ -134,7 +134,7 @@ final class PhabricatorCalendarImportEditEngine $fields[] = id(new PhabricatorSelectEditField()) ->setKey('frequency') ->setLabel(pht('Update Automatically')) - ->setDescription(pht('Configure an automatic update frequncy.')) + ->setDescription(pht('Configure an automatic update frequency.')) ->setTransactionType( PhabricatorCalendarImportFrequencyTransaction::TRANSACTIONTYPE) ->setConduitDescription(pht('Set the automatic update frequency.')) diff --git a/src/applications/calendar/icon/PhabricatorCalendarIconSet.php b/src/applications/calendar/icon/PhabricatorCalendarIconSet.php index 22d5b0e4f5..ab6d2126ed 100644 --- a/src/applications/calendar/icon/PhabricatorCalendarIconSet.php +++ b/src/applications/calendar/icon/PhabricatorCalendarIconSet.php @@ -16,7 +16,7 @@ final class PhabricatorCalendarIconSet 'fa-plane' => pht('Travel'), 'fa-plus-square' => pht('Health / Appointment'), - 'fa-rocket' => pht('Sabatical / Leave'), + 'fa-rocket' => pht('Sabbatical / Leave'), 'fa-home' => pht('Working From Home'), 'fa-tree' => pht('Holiday'), 'fa-gamepad' => pht('Staycation'), diff --git a/src/applications/calendar/util/CalendarTimeUtil.php b/src/applications/calendar/util/CalendarTimeUtil.php index 781f6adf7a..d3276654e4 100644 --- a/src/applications/calendar/util/CalendarTimeUtil.php +++ b/src/applications/calendar/util/CalendarTimeUtil.php @@ -8,7 +8,7 @@ * calendar views - one for the conpherence calendar widget and one for the * user profile calendar view. These have slight differences such as * conpherence showing both a three day "today 'til 2 days from now" *and* - * a Sunday -> Saturday list, whilest the profile view shows a more simple + * a Sunday -> Saturday list, whilst the profile view shows a more simple * seven day rolling list of events. */ final class CalendarTimeUtil extends Phobject { diff --git a/src/applications/calendar/xaction/PhabricatorCalendarEventFrequencyTransaction.php b/src/applications/calendar/xaction/PhabricatorCalendarEventFrequencyTransaction.php index 6fb8ae8f31..69f2e9e8a6 100644 --- a/src/applications/calendar/xaction/PhabricatorCalendarEventFrequencyTransaction.php +++ b/src/applications/calendar/xaction/PhabricatorCalendarEventFrequencyTransaction.php @@ -23,7 +23,7 @@ final class PhabricatorCalendarEventFrequencyTransaction // month, it means "the 30th of every month" as far as the RRULE is // concerned. Such an event will not occur on months with fewer days. - // This is surprising, and proably not what the user wants. Instead, + // This is surprising, and probably not what the user wants. Instead, // schedule these events relative to the end of the month: on the "-1st", // "-2nd" or "-3rd" day of the month. For example, a monthly event on // the 31st of a 31-day month translates to "every month, on the last @@ -66,7 +66,7 @@ final class PhabricatorCalendarEventFrequencyTransaction if (!isset($valid[$value])) { $errors[] = $this->newInvalidError( pht( - 'Event frequency "%s" is not valid. Valid frequences are: %s.', + 'Event frequency "%s" is not valid. Valid frequencies are: %s.', $value, implode(', ', $valid)), $xaction); diff --git a/src/applications/calendar/xaction/PhabricatorCalendarEventInviteTransaction.php b/src/applications/calendar/xaction/PhabricatorCalendarEventInviteTransaction.php index f1da2c1d77..841a066320 100644 --- a/src/applications/calendar/xaction/PhabricatorCalendarEventInviteTransaction.php +++ b/src/applications/calendar/xaction/PhabricatorCalendarEventInviteTransaction.php @@ -132,7 +132,7 @@ final class PhabricatorCalendarEventInviteTransaction $this->renderHandleList($rem)); } else { return pht( - '%s invited %s attendee(s): %s; uninvinted %s attendee(s): %s.', + '%s invited %s attendee(s): %s; uninvited %s attendee(s): %s.', $this->renderAuthor(), phutil_count($add), $this->renderHandleList($add), @@ -161,7 +161,7 @@ final class PhabricatorCalendarEventInviteTransaction } else { return pht( '%s updated the invite list for %s, invited %s: %s; '. - 'uninvinted %s: %s.', + 'uninvited %s: %s.', $this->renderAuthor(), $this->renderObject(), phutil_count($add), diff --git a/src/applications/calendar/xaction/PhabricatorCalendarImportFrequencyTransaction.php b/src/applications/calendar/xaction/PhabricatorCalendarImportFrequencyTransaction.php index 177adbbf0b..9fc68a3497 100644 --- a/src/applications/calendar/xaction/PhabricatorCalendarImportFrequencyTransaction.php +++ b/src/applications/calendar/xaction/PhabricatorCalendarImportFrequencyTransaction.php @@ -32,7 +32,7 @@ final class PhabricatorCalendarImportFrequencyTransaction if (!isset($valid[$value])) { $errors[] = $this->newInvalidError( pht( - 'Import frequency "%s" is not valid. Valid frequences are: %s.', + 'Import frequency "%s" is not valid. Valid frequencies are: %s.', $value, implode(', ', $valid)), $xaction); diff --git a/src/applications/config/check/PhabricatorStorageSetupCheck.php b/src/applications/config/check/PhabricatorStorageSetupCheck.php index 09cecfe6d0..cc74cce2ea 100644 --- a/src/applications/config/check/PhabricatorStorageSetupCheck.php +++ b/src/applications/config/check/PhabricatorStorageSetupCheck.php @@ -85,7 +85,7 @@ final class PhabricatorStorageSetupCheck extends PhabricatorSetupCheck { 'be buffered into memory before being written to permanent '. 'storage. Phabricator needs memory available to store these '. 'chunks while they are uploaded, but PHP is currently configured '. - 'to severly limit the available memory.'. + 'to severely limit the available memory.'. "\n\n". 'PHP processes currently have very little free memory available '. '(%s). To work well, processes should have at least %s.'. diff --git a/src/applications/conpherence/query/ConpherenceThreadQuery.php b/src/applications/conpherence/query/ConpherenceThreadQuery.php index 1bb96537dc..5cd6489d65 100644 --- a/src/applications/conpherence/query/ConpherenceThreadQuery.php +++ b/src/applications/conpherence/query/ConpherenceThreadQuery.php @@ -290,7 +290,7 @@ final class ConpherenceThreadQuery ->withObjectPHIDs(array_keys($conpherences)) ->needHandles(true); - // We have to flip these for the underyling query class. The semantics of + // We have to flip these for the underlying query class. The semantics of // paging are tricky business. if ($this->afterTransactionID) { $query->setBeforeID($this->afterTransactionID); diff --git a/src/applications/dashboard/customfield/PhabricatorDashboardPanelTabsCustomField.php b/src/applications/dashboard/customfield/PhabricatorDashboardPanelTabsCustomField.php index 96566db54a..07bbb67ae2 100644 --- a/src/applications/dashboard/customfield/PhabricatorDashboardPanelTabsCustomField.php +++ b/src/applications/dashboard/customfield/PhabricatorDashboardPanelTabsCustomField.php @@ -78,7 +78,7 @@ final class PhabricatorDashboardPanelTabsCustomField public function renderEditControl(array $handles) { // NOTE: This includes archived panels so we don't mutate the tabs - // when saving a tab panel that includes archied panels. This whole UI is + // when saving a tab panel that includes archived panels. This whole UI is // hopefully temporary anyway. $value = $this->getFieldValue(); diff --git a/src/applications/differential/controller/DifferentialController.php b/src/applications/differential/controller/DifferentialController.php index fb8a6249a7..1860a07745 100644 --- a/src/applications/differential/controller/DifferentialController.php +++ b/src/applications/differential/controller/DifferentialController.php @@ -217,7 +217,7 @@ abstract class DifferentialController extends PhabricatorController { // by default and let the user toggle the rest. With modern messages, // we can send the user to the Harbormaster detail page. Just show // "a lot" of messages in legacy cases to try to strike a balance - // between implementation simplicitly and compatibility. + // between implementation simplicity and compatibility. $legacy_messages = array_slice($legacy_messages, 0, 100); $messages = array(); diff --git a/src/applications/differential/customfield/DifferentialHarbormasterField.php b/src/applications/differential/customfield/DifferentialHarbormasterField.php index c9b573bda2..cc13be3aa7 100644 --- a/src/applications/differential/customfield/DifferentialHarbormasterField.php +++ b/src/applications/differential/customfield/DifferentialHarbormasterField.php @@ -45,7 +45,7 @@ abstract class DifferentialHarbormasterField // by default and let the user toggle the rest. With modern messages, // we can send the user to the Harbormaster detail page. Just show // "a lot" of messages in legacy cases to try to strike a balance - // between implementation simplicitly and compatibility. + // between implementation simplicity and compatibility. $legacy_messages = array_slice($legacy_messages, 0, 100); foreach ($legacy_messages as $message) { diff --git a/src/applications/differential/editor/DifferentialDiffEditor.php b/src/applications/differential/editor/DifferentialDiffEditor.php index 0058485e63..261f6f1598 100644 --- a/src/applications/differential/editor/DifferentialDiffEditor.php +++ b/src/applications/differential/editor/DifferentialDiffEditor.php @@ -106,7 +106,7 @@ final class DifferentialDiffEditor * We run Herald as part of transaction validation because Herald can * block diff creation for Differential diffs. Its important to do this * separately so no Herald logs are saved; these logs could expose - * information the Herald rules are inteneded to block. + * information the Herald rules are intended to block. */ protected function validateTransaction( PhabricatorLiskDAO $object, diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php index 88303cf420..1eeb4c8452 100644 --- a/src/applications/differential/parser/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/DifferentialChangesetParser.php @@ -699,7 +699,7 @@ final class DifferentialChangesetParser extends Phobject { $hunk_parser->parseHunksForLineData($changeset->getHunks()); // Depending on the whitespace mode, we may need to compute a different - // set of changes than the set of changes in the hunk data (specificaly, + // set of changes than the set of changes in the hunk data (specifically, // we might want to consider changed lines which have only whitespace // changes as unchanged). if ($ignore_all) { @@ -1192,11 +1192,11 @@ final class DifferentialChangesetParser extends Phobject { * Mask - compute the actual lines that need to be shown (because they * are near changes lines, near inline comments, or the request has * explicitly asked for them, i.e. resulting from the user clicking - * "show more"). The $mask returned is a sparesely populated dictionary + * "show more"). The $mask returned is a sparsely populated dictionary * of $visible_line_number => true. * * Depths - compute how indented any given line is. The $depths returned - * is a sparesely populated dictionary of $visible_line_number => $depth. + * is a sparsely populated dictionary of $visible_line_number => $depth. * * This function also has the side effect of modifying member variable * new such that tabs are normalized to spaces for each line of the diff. diff --git a/src/applications/differential/storage/DifferentialModernHunk.php b/src/applications/differential/storage/DifferentialModernHunk.php index cde6f29329..c3675c8adf 100644 --- a/src/applications/differential/storage/DifferentialModernHunk.php +++ b/src/applications/differential/storage/DifferentialModernHunk.php @@ -128,7 +128,7 @@ final class DifferentialModernHunk extends DifferentialHunk { $this->setData($file->getPHID()); // NOTE: Because hunks don't have a PHID and we just load hunk data with - // the ominipotent viewer, we do not need to attach the file to anything. + // the omnipotent viewer, we do not need to attach the file to anything. $result = $this->save(); diff --git a/src/applications/differential/storage/DifferentialRevision.php b/src/applications/differential/storage/DifferentialRevision.php index 7bcd178a41..e29db36b14 100644 --- a/src/applications/differential/storage/DifferentialRevision.php +++ b/src/applications/differential/storage/DifferentialRevision.php @@ -442,7 +442,7 @@ final class DifferentialRevision extends DifferentialDAO // For each path which the viewer owns a package for, find other packages // which that authority can be used to force-accept. Once we find a way to - // force-accept a package, we don't need to keep loooking. + // force-accept a package, we don't need to keep looking. $has_control = array(); foreach ($force_map as $path => $spec) { $path_fragments = PhabricatorOwnersPackage::splitPath($path); @@ -891,7 +891,7 @@ final class DifferentialRevision extends DifferentialDAO self::TABLE_COMMIT, $this->getID()); - // we have to do paths a little differentally as they do not have + // we have to do paths a little differently as they do not have // an id or phid column for delete() to act on $dummy_path = new DifferentialAffectedPath(); queryfx( diff --git a/src/applications/differential/typeahead/DifferentialResponsibleViewerFunctionDatasource.php b/src/applications/differential/typeahead/DifferentialResponsibleViewerFunctionDatasource.php index 51eb2beb9a..d23ecff47d 100644 --- a/src/applications/differential/typeahead/DifferentialResponsibleViewerFunctionDatasource.php +++ b/src/applications/differential/typeahead/DifferentialResponsibleViewerFunctionDatasource.php @@ -22,7 +22,7 @@ final class DifferentialResponsibleViewerFunctionDatasource 'summary' => pht('Use the current viewing user.'), 'description' => pht( 'Show revisions the current viewer is responsible for. This '. - 'function inclues revisions the viewer is responsible for through '. + 'function includes revisions the viewer is responsible for through '. 'membership in projects and packages.'), ), ); diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index 38c94e8a92..d7734856f0 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -479,7 +479,7 @@ final class DiffusionCommitController extends DiffusionController { // chains of events). This should be rare, but does not indicate a bug // or data issue. - // NOTE: We never query push logs in SVN because the commiter is always + // NOTE: We never query push logs in SVN because the committer is always // the pusher and the commit time is always the push time; the push log // is redundant and we save a query by skipping it. diff --git a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php index 2459c8c559..b3baafbd06 100644 --- a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php +++ b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php @@ -338,7 +338,7 @@ final class DiffusionRepositoryEditEngine ->setIsCopyable(true) ->setDescription(pht('Track only these branches.')) ->setConduitDescription(pht('Set the tracked branches.')) - ->setConduitTypeDescription(pht('New tracked branchs.')) + ->setConduitTypeDescription(pht('New tracked branches.')) ->setValue($track_value), id(new PhabricatorTextAreaEditField()) ->setIsStringList(true) @@ -349,7 +349,7 @@ final class DiffusionRepositoryEditEngine ->setIsCopyable(true) ->setDescription(pht('Autoclose commits on only these branches.')) ->setConduitDescription(pht('Set the autoclose branches.')) - ->setConduitTypeDescription(pht('New default tracked branchs.')) + ->setConduitTypeDescription(pht('New default tracked branches.')) ->setValue($autoclose_value), id(new PhabricatorTextEditField()) ->setKey('importOnly') @@ -396,7 +396,7 @@ final class DiffusionRepositoryEditEngine ->setConduitDescription( pht('Change symbol languages for this repository.')) ->setConduitTypeDescription( - pht('New symbol langauges.')) + pht('New symbol languages.')) ->setValue($object->getSymbolLanguages()), id(new PhabricatorDatasourceEditField()) ->setKey('symbolRepositoryPHIDs') diff --git a/src/applications/diffusion/engine/DiffusionCommitHookEngine.php b/src/applications/diffusion/engine/DiffusionCommitHookEngine.php index 21df37d87d..7fe45834b3 100644 --- a/src/applications/diffusion/engine/DiffusionCommitHookEngine.php +++ b/src/applications/diffusion/engine/DiffusionCommitHookEngine.php @@ -1230,7 +1230,7 @@ final class DiffusionCommitHookEngine extends Phobject { // also look at author data (do the commits come from multiple different // authors?) and commit date data (is the oldest commit more than 48 hours // old), but we don't have immediate access to those and this simple - // heruistic might be good enough. + // heuristic might be good enough. $commit_count = 0; $type_commit = PhabricatorRepositoryPushLog::REFTYPE_COMMIT; diff --git a/src/applications/diffusion/gitlfs/DiffusionGitLFSAuthenticateWorkflow.php b/src/applications/diffusion/gitlfs/DiffusionGitLFSAuthenticateWorkflow.php index aca7367f8c..41c009455d 100644 --- a/src/applications/diffusion/gitlfs/DiffusionGitLFSAuthenticateWorkflow.php +++ b/src/applications/diffusion/gitlfs/DiffusionGitLFSAuthenticateWorkflow.php @@ -80,7 +80,7 @@ final class DiffusionGitLFSAuthenticateWorkflow $lfs_uri = $repository->getGitLFSURI('info/lfs'); - // Generate a temporary token to allow the user to acces LFS over HTTP. + // Generate a temporary token to allow the user to access LFS over HTTP. // This works even if normal HTTP repository operations are not available // on this host, and does not require the user to have a VCS password. diff --git a/src/applications/diffusion/herald/HeraldCommitAdapter.php b/src/applications/diffusion/herald/HeraldCommitAdapter.php index 4687028418..bfcd8e3ccb 100644 --- a/src/applications/diffusion/herald/HeraldCommitAdapter.php +++ b/src/applications/diffusion/herald/HeraldCommitAdapter.php @@ -112,7 +112,7 @@ final class HeraldCommitAdapter $phids[] = $repository_phid; // NOTE: This is projects for the repository, not for the commit. When - // Herald evalutes, commits normally can not have any project tags yet. + // Herald evaluates, commits normally can not have any project tags yet. $repository_project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( $repository_phid, $project_type); diff --git a/src/applications/diffusion/protocol/DiffusionCommandEngine.php b/src/applications/diffusion/protocol/DiffusionCommandEngine.php index b787745a02..53a086db33 100644 --- a/src/applications/diffusion/protocol/DiffusionCommandEngine.php +++ b/src/applications/diffusion/protocol/DiffusionCommandEngine.php @@ -178,7 +178,7 @@ abstract class DiffusionCommandEngine extends Phobject { if (!$device) { throw new Exception( pht( - 'Attempting to build a reposiory command (for repository "%s") '. + 'Attempting to build a repository command (for repository "%s") '. 'as device, but this host ("%s") is not configured as a cluster '. 'device.', $repository->getDisplayName(), diff --git a/src/applications/diffusion/protocol/DiffusionMercurialWireProtocol.php b/src/applications/diffusion/protocol/DiffusionMercurialWireProtocol.php index 32a73867e5..251935a6dc 100644 --- a/src/applications/diffusion/protocol/DiffusionMercurialWireProtocol.php +++ b/src/applications/diffusion/protocol/DiffusionMercurialWireProtocol.php @@ -101,7 +101,7 @@ final class DiffusionMercurialWireProtocol extends Phobject { /** If the server version is running 3.4+ it will respond * with 'bundle2' capability in the format of "bundle2=(url-encoding)". - * Until we maange to properly package up bundles to send back we + * Until we manage to properly package up bundles to send back we * disallow the client from knowing we speak bundle2 by removing it * from the capabilities listing. * diff --git a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php index e822bb76b0..35bb4d4acf 100644 --- a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php +++ b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php @@ -231,7 +231,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject { // no way to tell which one has the "right" data. If we pick wrong, we // might erase some or all of the data in the repository. - // Since this is dangeorus, we refuse to guess unless there is only one + // Since this is dangerous, we refuse to guess unless there is only one // device. If we're the only device in the group, we obviously must be // a leader. @@ -252,7 +252,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject { 'Repository "%s" exists on more than one device, but no device '. 'has any repository version information. Phabricator can not '. 'guess which copy of the existing data is authoritative. Promote '. - 'a device or see "Ambigous Leaders" in the documentation.', + 'a device or see "Ambiguous Leaders" in the documentation.', $repository->getDisplayName())); } diff --git a/src/applications/diffusion/query/DiffusionCachedResolveRefsQuery.php b/src/applications/diffusion/query/DiffusionCachedResolveRefsQuery.php index 22ff1d61f0..0217c97d58 100644 --- a/src/applications/diffusion/query/DiffusionCachedResolveRefsQuery.php +++ b/src/applications/diffusion/query/DiffusionCachedResolveRefsQuery.php @@ -9,7 +9,7 @@ * low-level query can. * * This class can resolve the most common refs (commits, branches, tags) and - * can do so cheapy (by examining the database, without needing to make calls + * can do so cheaply (by examining the database, without needing to make calls * to the VCS or the service host). */ final class DiffusionCachedResolveRefsQuery diff --git a/src/applications/diffusion/query/DiffusionCommitQuery.php b/src/applications/diffusion/query/DiffusionCommitQuery.php index 1521f5770c..da8937910e 100644 --- a/src/applications/diffusion/query/DiffusionCommitQuery.php +++ b/src/applications/diffusion/query/DiffusionCommitQuery.php @@ -69,7 +69,7 @@ final class DiffusionCommitQuery /** * Look up commits in a specific repository. Prefer - * @{method:withRepositoryIDs}; the underyling table is keyed by ID such + * @{method:withRepositoryIDs}; the underlying table is keyed by ID such * that this method requires a separate initial query to map PHID to ID. */ public function withRepositoryPHIDs(array $phids) { diff --git a/src/applications/diffusion/xaction/DiffusionCommitConcernTransaction.php b/src/applications/diffusion/xaction/DiffusionCommitConcernTransaction.php index ff1cc9f3c5..30ec8d9f6d 100644 --- a/src/applications/diffusion/xaction/DiffusionCommitConcernTransaction.php +++ b/src/applications/diffusion/xaction/DiffusionCommitConcernTransaction.php @@ -53,7 +53,7 @@ final class DiffusionCommitConcernTransaction } // Even if you've already raised a concern, you can raise again as long - // as the author requsted you verify. + // as the author requested you verify. $state_verify = PhabricatorAuditCommitStatusConstants::NEEDS_VERIFICATION; if ($this->isViewerFullyRejected($object, $viewer)) { diff --git a/src/applications/diffusion/xaction/DiffusionCommitVerifyTransaction.php b/src/applications/diffusion/xaction/DiffusionCommitVerifyTransaction.php index f9b3fc5161..a44261f7a4 100644 --- a/src/applications/diffusion/xaction/DiffusionCommitVerifyTransaction.php +++ b/src/applications/diffusion/xaction/DiffusionCommitVerifyTransaction.php @@ -53,7 +53,7 @@ final class DiffusionCommitVerifyTransaction throw new Exception( pht( 'You can not request verification of this commit because no '. - 'auditors have raised conerns with it.')); + 'auditors have raised concerns with it.')); } } diff --git a/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php b/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php index 76a81d7ef1..a050a859e3 100644 --- a/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php +++ b/src/applications/drydock/blueprint/DrydockBlueprintImplementation.php @@ -64,7 +64,7 @@ abstract class DrydockBlueprintImplementation extends Phobject { * is a coarse compatibility check between a lease and a resource. * * @param DrydockBlueprint Concrete blueprint to allocate for. - * @param DrydockResource Candidiate resource to allocate the lease on. + * @param DrydockResource Candidate resource to allocate the lease on. * @param DrydockLease Pending lease that wants to allocate here. * @return bool True if the resource and lease are compatible. * @task lease @@ -76,7 +76,7 @@ abstract class DrydockBlueprintImplementation extends Phobject { /** - * Acquire a lease. Allows resources to peform setup as leases are brought + * Acquire a lease. Allows resources to perform setup as leases are brought * online. * * If acquisition fails, throw an exception. diff --git a/src/applications/drydock/storage/DrydockAuthorization.php b/src/applications/drydock/storage/DrydockAuthorization.php index cfd186c9d3..32e694918c 100644 --- a/src/applications/drydock/storage/DrydockAuthorization.php +++ b/src/applications/drydock/storage/DrydockAuthorization.php @@ -100,7 +100,7 @@ final class DrydockAuthorization extends DrydockDAO } /** - * Apply external authorization effects after a user chagnes the value of a + * Apply external authorization effects after a user changes the value of a * blueprint selector control an object. * * @param PhabricatorUser User applying the change. diff --git a/src/applications/drydock/worker/DrydockLeaseUpdateWorker.php b/src/applications/drydock/worker/DrydockLeaseUpdateWorker.php index a41e57fbf8..d73506f286 100644 --- a/src/applications/drydock/worker/DrydockLeaseUpdateWorker.php +++ b/src/applications/drydock/worker/DrydockLeaseUpdateWorker.php @@ -241,7 +241,7 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker { // NOTE: We have not acquired the lease yet, so it is possible that the // resource we just built will be snatched up by some other lease before // we can acquire it. This is not problematic: we'll retry a little later - // and should suceed eventually. + // and should succeed eventually. } $resources = $this->rankResources($resources, $lease); @@ -261,7 +261,7 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker { if (!$allocated) { throw new PhutilAggregateException( pht( - 'Unable to acquire lease "%s" on any resouce.', + 'Unable to acquire lease "%s" on any resource.', $lease->getPHID()), $exceptions); } @@ -725,7 +725,7 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker { // performed the read above and now, the resource might have closed, so // we may activate leases on dead resources. At least for now, this seems // fine: a resource dying right before we activate a lease on it should not - // be distinguisahble from a resource dying right after we activate a lease + // be distinguishable from a resource dying right after we activate a lease // on it. We end up with an active lease on a dead resource either way, and // can not prevent resources dying from lightning strikes. diff --git a/src/applications/drydock/worker/DrydockWorker.php b/src/applications/drydock/worker/DrydockWorker.php index f167fef5d0..443780680d 100644 --- a/src/applications/drydock/worker/DrydockWorker.php +++ b/src/applications/drydock/worker/DrydockWorker.php @@ -199,7 +199,7 @@ abstract class DrydockWorker extends PhabricatorWorker { $viewer = $this->getViewer(); // Don't reclaim a resource if it has been updated recently. If two - // leases are fighting, we don't want them to keep reclaming resources + // leases are fighting, we don't want them to keep reclaiming resources // from one another forever without making progress, so make resources // immune to reclamation for a little while after they activate or update. diff --git a/src/applications/files/controller/PhabricatorFileDataController.php b/src/applications/files/controller/PhabricatorFileDataController.php index c8bfcc488a..da438730cd 100644 --- a/src/applications/files/controller/PhabricatorFileDataController.php +++ b/src/applications/files/controller/PhabricatorFileDataController.php @@ -119,7 +119,7 @@ final class PhabricatorFileDataController extends PhabricatorFileController { // make this logic simpler and more consistent. // Beyond making the policy check itself more consistent, this also makes - // sure we're consitent about returning HTTP 404 on bad requests instead + // sure we're consistent about returning HTTP 404 on bad requests instead // of serving HTTP 200 with a login page, which can mislead some clients. $viewer = PhabricatorUser::getOmnipotentUser(); diff --git a/src/applications/files/management/PhabricatorFilesManagementCatWorkflow.php b/src/applications/files/management/PhabricatorFilesManagementCatWorkflow.php index 70d5eca5a2..5bf40a057d 100644 --- a/src/applications/files/management/PhabricatorFilesManagementCatWorkflow.php +++ b/src/applications/files/management/PhabricatorFilesManagementCatWorkflow.php @@ -24,7 +24,7 @@ final class PhabricatorFilesManagementCatWorkflow 'help' => pht( 'DANGEROUS. Attempt to salvage file content even if the '. 'integrity check fails. If an adversary has tampered with '. - 'the file, the conent may be unsafe.'), + 'the file, the content may be unsafe.'), ), array( 'name' => 'names', diff --git a/src/applications/fund/editor/FundInitiativeEditEngine.php b/src/applications/fund/editor/FundInitiativeEditEngine.php index 201a814a0c..824f4e009f 100644 --- a/src/applications/fund/editor/FundInitiativeEditEngine.php +++ b/src/applications/fund/editor/FundInitiativeEditEngine.php @@ -50,7 +50,7 @@ final class FundInitiativeEditEngine } protected function getObjectName() { - return pht('Initivative'); + return pht('Initiative'); } protected function getObjectCreateCancelURI($object) { diff --git a/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php b/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php index 9c3f88d631..dbf1f18cfa 100644 --- a/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php +++ b/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php @@ -142,7 +142,7 @@ final class HarbormasterSendMessageConduitAPIMethod "=============\n". "When you send Harbormaster a message, you must include a `type`, ". "which describes the overall state of the build. For example, use ". - "`pass` to tell Harbomaster that a build completed successfully.". + "`pass` to tell Harbormaster that a build completed successfully.". "\n\n". "Supported message types are:". "\n\n". @@ -155,7 +155,7 @@ final class HarbormasterSendMessageConduitAPIMethod "message, but you can also send a `work` message to report intermediate ". "results.\n\n". "To provide unit test results, pass a list of results in the `unit` ". - "parameter. Each result shoud be a dictionary with these keys:". + "parameter. Each result should be a dictionary with these keys:". "\n\n". "%s". "\n\n". diff --git a/src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php b/src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php index cdb2044cc5..b29958882c 100644 --- a/src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php +++ b/src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php @@ -38,7 +38,7 @@ final class HarbormasterBuildStep extends HarbormasterDAO // T6203/NULLABILITY // This should not be nullable. Current `null` values indicate steps // which predated editable names. These should be backfilled with - // default names, then the code for handling `null` shoudl be removed. + // default names, then the code for handling `null` should be removed. 'name' => 'text255?', 'stepAutoKey' => 'text32?', ), diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignController.php b/src/applications/legalpad/controller/LegalpadDocumentSignController.php index 05a691e34a..f19cf43d0e 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentSignController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentSignController.php @@ -236,7 +236,7 @@ final class LegalpadDocumentSignController extends LegalpadController { // Use the last content update as the modified date. We don't want to // show that a document like a TOS was "updated" by an incidental change - // to a field like the preamble or privacy settings which does not acutally + // to a field like the preamble or privacy settings which does not actually // affect the content of the agreement. $content_updated = $document_body->getDateCreated(); diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php index 6a5b3ad50c..66aa154e8f 100644 --- a/src/applications/maniphest/controller/ManiphestReportController.php +++ b/src/applications/maniphest/controller/ManiphestReportController.php @@ -116,7 +116,7 @@ final class ManiphestReportController extends ManiphestController { case ManiphestTaskMergedIntoTransaction::TRANSACTIONTYPE: // NOTE: Merging a task does not generate a "status" transaction. // We pretend it did. Note that this is not always accurate: it is - // possble to merge a task which was previously closed, but this + // possible to merge a task which was previously closed, but this // fake transaction always counts a merge as a closure. $oldv = $default_status; $newv = $duplicate_status; @@ -762,7 +762,7 @@ final class ManiphestReportController extends ManiphestController { // and equal distance in the past. This is so users can type "6 days" (which // means "6 days from now") and get the behavior of "6 days ago", rather // than no results (because the window epoch is in the future). This might - // be a little confusing because it casues "tomorrow" to mean "yesterday" + // be a little confusing because it causes "tomorrow" to mean "yesterday" // and "2022" (or whatever) to mean "ten years ago", but these inputs are // nonsense anyway. diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php index 1b780549dc..caf70b8f3c 100644 --- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php +++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php @@ -972,7 +972,7 @@ final class ManiphestTransactionEditor $object_phid = $object->getPHID(); - // We're doing layout with the ominpotent viewer to make sure we don't + // We're doing layout with the omnipotent viewer to make sure we don't // remove positions in columns that exist, but which the actual actor // can't see. $omnipotent_viewer = PhabricatorUser::getOmnipotentUser(); diff --git a/src/applications/metamta/management/PhabricatorMailManagementUnverifyWorkflow.php b/src/applications/metamta/management/PhabricatorMailManagementUnverifyWorkflow.php index 61861d1db0..64f4976ebe 100644 --- a/src/applications/metamta/management/PhabricatorMailManagementUnverifyWorkflow.php +++ b/src/applications/metamta/management/PhabricatorMailManagementUnverifyWorkflow.php @@ -63,7 +63,7 @@ final class PhabricatorMailManagementUnverifyWorkflow echo tsprintf( "%s\n", pht( - 'Address "%s" (owned by "%s") is already unveriifed.', + 'Address "%s" (owned by "%s") is already unverified.', $address, $user->getUsername())); continue; diff --git a/src/applications/metamta/receiver/PhabricatorMailReceiver.php b/src/applications/metamta/receiver/PhabricatorMailReceiver.php index 05b44f364a..12483bf5b6 100644 --- a/src/applications/metamta/receiver/PhabricatorMailReceiver.php +++ b/src/applications/metamta/receiver/PhabricatorMailReceiver.php @@ -255,7 +255,7 @@ abstract class PhabricatorMailReceiver extends Phobject { /** - * Reduce an email address to its canonical form. For example, an adddress + * Reduce an email address to its canonical form. For example, an address * like: * * "Abraham Lincoln" < ALincoln@example.com > diff --git a/src/applications/owners/storage/__tests__/PhabricatorOwnersPackageTestCase.php b/src/applications/owners/storage/__tests__/PhabricatorOwnersPackageTestCase.php index f21f09b44e..d219abfc1e 100644 --- a/src/applications/owners/storage/__tests__/PhabricatorOwnersPackageTestCase.php +++ b/src/applications/owners/storage/__tests__/PhabricatorOwnersPackageTestCase.php @@ -82,7 +82,7 @@ final class PhabricatorOwnersPackageTestCase extends PhabricatorTestCase { // Now, add a more specific path to Package #1. This tests nested ownership // in packages with weak dominion rules. This time, Package #1 should end - // up back on top, with Package #2 cedeing control to its more specific + // up back on top, with Package #2 ceding control to its more specific // path. $rows[] = array( 'id' => 1, diff --git a/src/applications/passphrase/credentialtype/PassphraseCredentialType.php b/src/applications/passphrase/credentialtype/PassphraseCredentialType.php index 1da93bcd38..60cb9bb5ae 100644 --- a/src/applications/passphrase/credentialtype/PassphraseCredentialType.php +++ b/src/applications/passphrase/credentialtype/PassphraseCredentialType.php @@ -104,7 +104,7 @@ abstract class PassphraseCredentialType extends Phobject { /** - * Return true if the provided credental requires a password to decrypt. + * Return true if the provided credential requires a password to decrypt. * * @param PhutilOpaqueEnvelope Credential secret value. * @return bool True if the credential needs a password. diff --git a/src/applications/passphrase/credentialtype/PassphraseSSHPrivateKeyTextCredentialType.php b/src/applications/passphrase/credentialtype/PassphraseSSHPrivateKeyTextCredentialType.php index d573f19f58..fa686aac4c 100644 --- a/src/applications/passphrase/credentialtype/PassphraseSSHPrivateKeyTextCredentialType.php +++ b/src/applications/passphrase/credentialtype/PassphraseSSHPrivateKeyTextCredentialType.php @@ -47,7 +47,7 @@ final class PassphraseSSHPrivateKeyTextCredentialType pht( 'Decrypting SSH keys requires the `%s` binary, but it '. 'is not available in %s. Either make it available or strip the '. - 'password fromt his SSH key manually before uploading it.', + 'password from this SSH key manually before uploading it.', 'ssh-keygen', '$PATH')); } diff --git a/src/applications/passphrase/view/PassphraseCredentialControl.php b/src/applications/passphrase/view/PassphraseCredentialControl.php index 9c9706fe3f..8ba1ef9bc8 100644 --- a/src/applications/passphrase/view/PassphraseCredentialControl.php +++ b/src/applications/passphrase/view/PassphraseCredentialControl.php @@ -67,7 +67,7 @@ final class PassphraseCredentialControl extends AphrontFormControl { $user_credential->getName()); } } catch (PhabricatorPolicyException $policy_exception) { - // Pull the credential with the ominipotent viewer so we can look up + // Pull the credential with the omnipotent viewer so we can look up // the ID and provide the monogram. $omnipotent_credential = id(new PassphraseCredentialQuery()) ->setViewer(PhabricatorUser::getOmnipotentUser()) diff --git a/src/applications/people/markup/PhabricatorMentionRemarkupRule.php b/src/applications/people/markup/PhabricatorMentionRemarkupRule.php index aa5b7f908e..60d4a8168f 100644 --- a/src/applications/people/markup/PhabricatorMentionRemarkupRule.php +++ b/src/applications/people/markup/PhabricatorMentionRemarkupRule.php @@ -10,7 +10,7 @@ final class PhabricatorMentionRemarkupRule extends PhutilRemarkupRule { // NOTE: The negative lookbehind prevents matches like "mail@lists", while // allowing constructs like "@tomo/@mroch". Since we now allow periods in - // usernames, we can't resonably distinguish that "@company.com" isn't a + // usernames, we can't reasonably distinguish that "@company.com" isn't a // username, so we'll incorrectly pick it up, but there's little to be done // about that. We forbid terminal periods so that we can correctly capture // "@joe" instead of "@joe." in "Hey, @joe.". diff --git a/src/applications/people/query/PhabricatorPeopleQuery.php b/src/applications/people/query/PhabricatorPeopleQuery.php index e756a9a4fd..35ff480833 100644 --- a/src/applications/people/query/PhabricatorPeopleQuery.php +++ b/src/applications/people/query/PhabricatorPeopleQuery.php @@ -425,7 +425,7 @@ final class PhabricatorPeopleQuery } // If the user is set to "Available" for this event, don't consider it - // when computin their away status. + // when computing their away status. if (!$invitee->getDisplayAvailability($event)) { continue; } @@ -492,7 +492,7 @@ final class PhabricatorPeopleQuery // valid for that long. // NOTE: This doesn't handle overlapping events with the greatest - // possible care. In theory, if you're attenting multiple events + // possible care. In theory, if you're attending multiple events // simultaneously we should accommodate that. However, it's complex // to compute, rare, and probably not confusing most of the time. diff --git a/src/applications/people/query/PhabricatorPeopleSearchEngine.php b/src/applications/people/query/PhabricatorPeopleSearchEngine.php index fa363c4428..0a4367d367 100644 --- a/src/applications/people/query/PhabricatorPeopleSearchEngine.php +++ b/src/applications/people/query/PhabricatorPeopleSearchEngine.php @@ -79,7 +79,7 @@ final class PhabricatorPeopleSearchEngine ->setOptions( pht('(Show All)'), pht('Show Only Unapproved Users'), - pht('Hide Unappproved Users')) + pht('Hide Unapproved Users')) ->setDescription( pht( 'Pass true to find only users awaiting administrative approval, '. diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php index 166feaa237..1745154826 100644 --- a/src/applications/people/storage/PhabricatorUser.php +++ b/src/applications/people/storage/PhabricatorUser.php @@ -407,7 +407,7 @@ final class PhabricatorUser $token = substr($token, $breach_prelen + self::CSRF_SALT_LENGTH); // When the user posts a form, we check that it contains a valid CSRF token. - // Tokens cycle each hour (every CSRF_CYLCE_FREQUENCY seconds) and we accept + // Tokens cycle each hour (every CSRF_CYCLE_FREQUENCY seconds) and we accept // either the current token, the next token (users can submit a "future" // token if you have two web frontends that have some clock skew) or any of // the last 6 tokens. This means that pages are valid for up to 7 hours. @@ -1180,7 +1180,7 @@ final class PhabricatorUser /** * Get a scalar string identifying this user. * - * This is similar to using the PHID, but distinguishes between ominpotent + * This is similar to using the PHID, but distinguishes between omnipotent * and public users explicitly. This allows safe construction of cache keys * or cache buckets which do not conflate public and omnipotent users. * @@ -1459,7 +1459,7 @@ final class PhabricatorUser id(new PhabricatorConduitSearchFieldSpecification()) ->setKey('roles') ->setType('list') - ->setDescription(pht('List of acccount roles.')), + ->setDescription(pht('List of account roles.')), ); } diff --git a/src/applications/phid/handle/pool/PhabricatorHandleList.php b/src/applications/phid/handle/pool/PhabricatorHandleList.php index d9a279f8ba..a7b404c5a7 100644 --- a/src/applications/phid/handle/pool/PhabricatorHandleList.php +++ b/src/applications/phid/handle/pool/PhabricatorHandleList.php @@ -82,7 +82,7 @@ final class PhabricatorHandleList if (!isset($this[$phid])) { throw new Exception( pht( - 'Trying to create a new sublist of an existsing handle list, '. + 'Trying to create a new sublist of an existing handle list, '. 'but PHID "%s" does not appear in the parent list.', $phid)); } diff --git a/src/applications/phid/resolver/PhabricatorPHIDResolver.php b/src/applications/phid/resolver/PhabricatorPHIDResolver.php index 9070139a0b..940221f551 100644 --- a/src/applications/phid/resolver/PhabricatorPHIDResolver.php +++ b/src/applications/phid/resolver/PhabricatorPHIDResolver.php @@ -3,7 +3,7 @@ /** * Resolve a list of identifiers into PHIDs. * - * This class simplifies the process of convering a list of mixed token types + * This class simplifies the process of converting a list of mixed token types * (like some PHIDs and some usernames) into a list of just PHIDs. */ abstract class PhabricatorPHIDResolver extends Phobject { diff --git a/src/applications/phortune/provider/PhortuneStripePaymentProvider.php b/src/applications/phortune/provider/PhortuneStripePaymentProvider.php index 1e7c348297..5adfc62e19 100644 --- a/src/applications/phortune/provider/PhortuneStripePaymentProvider.php +++ b/src/applications/phortune/provider/PhortuneStripePaymentProvider.php @@ -361,7 +361,7 @@ final class PhortuneStripePaymentProvider extends PhortunePaymentProvider { case 'error:duplicate_transaction': case 'error:processing_error': default: - // NOTE: These errors currently don't recevive a detailed message. + // NOTE: These errors currently don't receive a detailed message. // NOTE: We can also end up here with "http:nnn" messages. // TODO: At least some of these should have a better message, or be diff --git a/src/applications/phrequent/storage/PhrequentTimeBlock.php b/src/applications/phrequent/storage/PhrequentTimeBlock.php index ee5fd00a44..3800651476 100644 --- a/src/applications/phrequent/storage/PhrequentTimeBlock.php +++ b/src/applications/phrequent/storage/PhrequentTimeBlock.php @@ -124,7 +124,7 @@ final class PhrequentTimeBlock extends Phobject { } } else { // Here, we've prematurely ended a deeper stratum. Merge higher - // stata. This looks like this: + // strata. This looks like this: // // V // V diff --git a/src/applications/phriction/editor/PhrictionTransactionEditor.php b/src/applications/phriction/editor/PhrictionTransactionEditor.php index 1920b4c718..fcc9fe0474 100644 --- a/src/applications/phriction/editor/PhrictionTransactionEditor.php +++ b/src/applications/phriction/editor/PhrictionTransactionEditor.php @@ -452,7 +452,7 @@ final class PhrictionTransactionEditor $verb) { $errors = array(); - // NOTE: We use the ominpotent user for these checks because policy + // NOTE: We use the omnipotent user for these checks because policy // doesn't matter; existence does. $other_doc_viewer = PhabricatorUser::getOmnipotentUser(); $ancestral_slugs = PhabricatorSlug::getAncestry($object->getSlug()); diff --git a/src/applications/policy/filter/PhabricatorPolicyFilter.php b/src/applications/policy/filter/PhabricatorPolicyFilter.php index f3e1bd2083..fb03936ec2 100644 --- a/src/applications/policy/filter/PhabricatorPolicyFilter.php +++ b/src/applications/policy/filter/PhabricatorPolicyFilter.php @@ -257,7 +257,7 @@ final class PhabricatorPolicyFilter extends Phobject { $filtered[$key] = $object; } - // If we survied the primary checks, apply extended checks to objects + // If we survived the primary checks, apply extended checks to objects // with extended policies. $results = array(); $extended = array(); diff --git a/src/applications/project/query/PhabricatorProjectColumnQuery.php b/src/applications/project/query/PhabricatorProjectColumnQuery.php index 41ea770137..13f2f52a43 100644 --- a/src/applications/project/query/PhabricatorProjectColumnQuery.php +++ b/src/applications/project/query/PhabricatorProjectColumnQuery.php @@ -97,7 +97,7 @@ final class PhabricatorProjectColumnQuery if ($proxy_phid !== null) { $proxy = idx($proxies, $proxy_phid); - // Only attach valid proxies, so we don't end up getting surprsied if + // Only attach valid proxies, so we don't end up getting surprised if // an install somehow gets junk into their database. if (!($proxy instanceof PhabricatorColumnProxyInterface)) { $proxy = null; diff --git a/src/applications/project/remarkup/ProjectRemarkupRule.php b/src/applications/project/remarkup/ProjectRemarkupRule.php index 70d6b8eda3..96092bab86 100644 --- a/src/applications/project/remarkup/ProjectRemarkupRule.php +++ b/src/applications/project/remarkup/ProjectRemarkupRule.php @@ -24,7 +24,7 @@ final class ProjectRemarkupRule extends PhabricatorObjectRemarkupRule { protected function getObjectIDPattern() { // NOTE: The latter half of this rule matches monograms with internal // periods, like `#domain.com`, but does not match monograms with terminal - // periods, because they're probably just puncutation. + // periods, because they're probably just punctuation. // Broadly, this will not match every possible project monogram, and we // accept some false negatives -- like `#dot.` -- in order to avoid a bunch diff --git a/src/applications/releeph/differential/DifferentialReleephRequestFieldSpecification.php b/src/applications/releeph/differential/DifferentialReleephRequestFieldSpecification.php index dd67f5bc59..56d371f1d6 100644 --- a/src/applications/releeph/differential/DifferentialReleephRequestFieldSpecification.php +++ b/src/applications/releeph/differential/DifferentialReleephRequestFieldSpecification.php @@ -5,7 +5,7 @@ * * 1: To parse "Releeph: picks RQ" headers in commits created by * arc-releeph so that RQs committed by arc-releeph have real - * PhabricatorRepositoryCommits associated with them (instaed of just the SHA + * PhabricatorRepositoryCommits associated with them (instead of just the SHA * of the commit, as seen by the pusher). * * 2: If requestors want to commit directly to their release branch, they can diff --git a/src/applications/releeph/field/selector/ReleephDefaultFieldSelector.php b/src/applications/releeph/field/selector/ReleephDefaultFieldSelector.php index df5e075ebc..af18bfd3d6 100644 --- a/src/applications/releeph/field/selector/ReleephDefaultFieldSelector.php +++ b/src/applications/releeph/field/selector/ReleephDefaultFieldSelector.php @@ -7,7 +7,7 @@ final class ReleephDefaultFieldSelector extends ReleephFieldSelector { * * TODO: This is a giant hacky mess because I am dumb and moved forward on * Releeph changes with partial information. Recover from this as gracefully - * as possible. This obivously is an abomination. -epriestley + * as possible. This obviously is an abomination. -epriestley */ public static function isFacebook() { return class_exists('ReleephFacebookKarmaFieldSpecification'); diff --git a/src/applications/repository/daemon/PhabricatorMercurialGraphStream.php b/src/applications/repository/daemon/PhabricatorMercurialGraphStream.php index 33f947e2f8..205b267ed5 100644 --- a/src/applications/repository/daemon/PhabricatorMercurialGraphStream.php +++ b/src/applications/repository/daemon/PhabricatorMercurialGraphStream.php @@ -113,7 +113,7 @@ final class PhabricatorMercurialGraphStream private function parseParents($parents, $target_rev) { // The hg '{parents}' token is empty if there is one "natural" parent - // (predecessor local commit ID). Othwerwise, it may have one or two + // (predecessor local commit ID). Otherwise, it may have one or two // parents. The string looks like this: // // 151:1f6c61a60586 154:1d5f799ebe1e diff --git a/src/applications/repository/data/PhabricatorRepositoryURINormalizer.php b/src/applications/repository/data/PhabricatorRepositoryURINormalizer.php index 27e93535ab..a29d110a67 100644 --- a/src/applications/repository/data/PhabricatorRepositoryURINormalizer.php +++ b/src/applications/repository/data/PhabricatorRepositoryURINormalizer.php @@ -27,10 +27,10 @@ * // URIs are very unlikely to be the same repository. * } * - * Because a repository can be hosted at arbitrarly many arbitrary URIs, there + * Because a repository can be hosted at arbitrarily many arbitrary URIs, there * is no way to completely prevent false negatives by only examining URIs * (that is, repositories with totally different URIs could really be the same). - * However, normalization is relatively agressive and false negatives should + * However, normalization is relatively aggressive and false negatives should * be rare: if normalization says two URIs are different repositories, they * probably are. * diff --git a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php index d0b84a6b31..8e99aabafa 100644 --- a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php +++ b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php @@ -703,7 +703,7 @@ final class PhabricatorRepositoryDiscoveryEngine // new repository for the first time is less important than any other // daemon task. - // If the repostitory has finished importing and we're just catching up + // If the repository has finished importing and we're just catching up // on recent commits, we schedule discovery at COMMIT priority, which is // slightly below the default priority. diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php index 2f09ffd9be..71076314da 100644 --- a/src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php +++ b/src/applications/repository/management/PhabricatorRepositoryManagementThawWorkflow.php @@ -90,7 +90,7 @@ final class PhabricatorRepositoryManagementThawWorkflow $risk_message); $is_force = $args->getArg('force'); - $prompt = pht('Accept the possibilty of permanent data loss?'); + $prompt = pht('Accept the possibility of permanent data loss?'); if (!$is_force && !phutil_console_confirm($prompt)) { throw new PhutilArgumentUsageException( pht('User aborted the workflow.')); diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index 09fb239bf0..713ed92270 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -1875,7 +1875,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO /** - * Retrieve the sevice URI for the device hosting this repository. + * Retrieve the service URI for the device hosting this repository. * * See @{method:newConduitClient} for a general discussion of interacting * with repository services. This method provides lower-level resolution of @@ -2129,7 +2129,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO if ($this->isGit()) { // $_ENV does not populate in CLI contexts if "E" is missing from // "variables_order" in PHP config. Currently, we do not require this - // to be configured. Since it may not be, explictitly bring expected Git + // to be configured. Since it may not be, explicitly bring expected Git // environmental variables into scope. This list is not exhaustive, but // only lists variables with a known impact on commit hook behavior. diff --git a/src/applications/repository/storage/PhabricatorRepositoryURI.php b/src/applications/repository/storage/PhabricatorRepositoryURI.php index cbd25b74eb..c8d560705a 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryURI.php +++ b/src/applications/repository/storage/PhabricatorRepositoryURI.php @@ -362,7 +362,7 @@ final class PhabricatorRepositoryURI return PhabricatorEnv::getEnvConfig('diffusion.ssh-port'); } - // If Phabricator is running on a nonstandard port, use that as the defualt + // If Phabricator is running on a nonstandard port, use that as the default // port for URIs with the same protocol. $is_http = ($protocol == self::BUILTIN_PROTOCOL_HTTP); diff --git a/src/applications/repository/storage/PhabricatorRepositoryWorkingCopyVersion.php b/src/applications/repository/storage/PhabricatorRepositoryWorkingCopyVersion.php index 51abc70d35..750cc91c47 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryWorkingCopyVersion.php +++ b/src/applications/repository/storage/PhabricatorRepositoryWorkingCopyVersion.php @@ -66,7 +66,7 @@ final class PhabricatorRepositoryWorkingCopyVersion * may have committed and acknowledged a write on a node that lost the lock * partway through the write and is no longer reachable. * - * In particular, if a node loses its connection to the datbase the global + * In particular, if a node loses its connection to the database the global * lock is released by default. This is a durable lock which stays locked * by default. */ diff --git a/src/applications/repository/worker/commitchangeparser/PhabricatorRepositoryMercurialCommitChangeParserWorker.php b/src/applications/repository/worker/commitchangeparser/PhabricatorRepositoryMercurialCommitChangeParserWorker.php index 0fdd18b20f..60e6c5a5e6 100644 --- a/src/applications/repository/worker/commitchangeparser/PhabricatorRepositoryMercurialCommitChangeParserWorker.php +++ b/src/applications/repository/worker/commitchangeparser/PhabricatorRepositoryMercurialCommitChangeParserWorker.php @@ -216,7 +216,7 @@ final class PhabricatorRepositoryMercurialCommitChangeParserWorker $changes[$path]['changeType'] = DifferentialChangeType::TYPE_COPY_AWAY; } else if ($existing_type == DifferentialChangeType::TYPE_ADD) { - // This change removes a diretory and replaces it with a file. Mark + // This change removes a directory and replaces it with a file. Mark // it as "change" instead of "add". $changes[$path]['changeType'] = DifferentialChangeType::TYPE_CHANGE; } diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php index f4c460ce34..c0497a0c03 100644 --- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php +++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php @@ -359,7 +359,7 @@ abstract class PhabricatorApplicationSearchEngine extends Phobject { * ); * * Any unspecified fields (including custom fields and fields added - * automatically by infrastruture) will be put in the middle. + * automatically by infrastructure) will be put in the middle. * * @return list Default ordering for field keys. */ diff --git a/src/applications/search/management/PhabricatorSearchManagementWorkflow.php b/src/applications/search/management/PhabricatorSearchManagementWorkflow.php index 43dad986ea..b09f4b2105 100644 --- a/src/applications/search/management/PhabricatorSearchManagementWorkflow.php +++ b/src/applications/search/management/PhabricatorSearchManagementWorkflow.php @@ -5,7 +5,7 @@ abstract class PhabricatorSearchManagementWorkflow protected function validateClusterSearchConfig() { // Configuration is normally validated by setup self-checks on the web - // workflow, but users may reasonsably run `bin/search` commands after + // workflow, but users may reasonably run `bin/search` commands after // making manual edits to "local.json". Re-verify configuration here before // continuing. diff --git a/src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php b/src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php index e67d22b555..071979d391 100644 --- a/src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php +++ b/src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php @@ -80,7 +80,7 @@ final class PhabricatorMotivatorProfileMenuItem private function getCatFacts() { return array( pht('Cats purr when they are happy, upset, or asleep.'), - pht('The first cats evolved on the savanah about 8,000 years ago.'), + pht('The first cats evolved on the savannah about 8,000 years ago.'), pht( 'Cats have a tail, two feet, between one and three ears, and two '. 'other feet.'), @@ -111,7 +111,7 @@ final class PhabricatorMotivatorProfileMenuItem pht( 'Not all cats can retract their claws, but most of them can.'), pht( - 'In the wild, cats and racoons sometimes hunt together in packs.'), + 'In the wild, cats and raccoons sometimes hunt together in packs.'), pht( 'The Spanish word for cat is "cato". The biggest cat is called '. '"el cato".'), diff --git a/src/applications/settings/panel/PhabricatorSettingsPanel.php b/src/applications/settings/panel/PhabricatorSettingsPanel.php index d2008f8857..19ac6fec62 100644 --- a/src/applications/settings/panel/PhabricatorSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorSettingsPanel.php @@ -143,7 +143,7 @@ abstract class PhabricatorSettingsPanel extends Phobject { /** * Return false to prevent this panel from being displayed or used. You can * do, e.g., configuration checks here, to determine if the feature your - * panel controls is unavailble in this install. By default, all panels are + * panel controls is unavailable in this install. By default, all panels are * enabled. * * @return bool True if the panel should be shown. diff --git a/src/applications/settings/query/PhabricatorUserPreferencesQuery.php b/src/applications/settings/query/PhabricatorUserPreferencesQuery.php index de4887cbb8..1a6133724d 100644 --- a/src/applications/settings/query/PhabricatorUserPreferencesQuery.php +++ b/src/applications/settings/query/PhabricatorUserPreferencesQuery.php @@ -49,7 +49,7 @@ final class PhabricatorUserPreferencesQuery * If no settings exist for a user, a new empty settings object with * appropriate defaults is returned. * - * @param bool True to generat synthetic preferences for missing users. + * @param bool True to generate synthetic preferences for missing users. */ public function needSyntheticPreferences($synthetic) { $this->synthetic = $synthetic; diff --git a/src/applications/settings/setting/PhabricatorTimezoneSetting.php b/src/applications/settings/setting/PhabricatorTimezoneSetting.php index b7a6b94e30..887e08129b 100644 --- a/src/applications/settings/setting/PhabricatorTimezoneSetting.php +++ b/src/applications/settings/setting/PhabricatorTimezoneSetting.php @@ -46,7 +46,7 @@ final class PhabricatorTimezoneSetting throw new Exception( pht( - 'Timezone "%s" is not a valid timezone identiifer.', + 'Timezone "%s" is not a valid timezone identifier.', $value)); } diff --git a/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php b/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php index e005c120f0..817e92ce39 100644 --- a/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php +++ b/src/applications/subscriptions/controller/PhabricatorSubscriptionsEditController.php @@ -83,7 +83,7 @@ final class PhabricatorSubscriptionsEditController } else { // TODO: Eventually, get rid of this once everything implements - // PhabriatorApplicationTransactionInterface. + // PhabricatorApplicationTransactionInterface. $editor = id(new PhabricatorSubscriptionsEditor()) ->setActor($viewer) diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php index e1d6812778..6c9cb5e201 100644 --- a/src/applications/transactions/editengine/PhabricatorEditEngine.php +++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php @@ -763,7 +763,7 @@ abstract class PhabricatorEditEngine * Load an object given a configured query. * * @param PhabricatorPolicyAwareQuery Configured query. - * @param list List of required capabilitiy constants, or omit for + * @param list List of required capability constants, or omit for * defaults. * @return object|null Object, or null if no such object exists. * @task load @@ -1382,7 +1382,7 @@ abstract class PhabricatorEditEngine * and that field is visible and editable for the user. * * For example, you can use it to test if a user is able to reassign tasks - * or not, prior to rendering dedicated UI for task reassingment. + * or not, prior to rendering dedicated UI for task reassignment. * * Note that this method does NOT test if the user can actually edit the * current object, just if they have access to the related field. diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php index 07edf5b0c8..175a5775ee 100644 --- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php +++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php @@ -3701,7 +3701,7 @@ abstract class PhabricatorApplicationTransactionEditor // If a later project in the list is an ancestor of this one, it will // have added itself to the map. If any ancestor of this project points - // at itself in the map, this project should be dicarded in favor of + // at itself in the map, this project should be discarded in favor of // that later ancestor. foreach ($project->getAncestorProjects() as $ancestor) { $ancestor_phid = $ancestor->getPHID(); diff --git a/src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php b/src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php index 6956561490..8b747281b3 100644 --- a/src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php +++ b/src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php @@ -451,7 +451,7 @@ abstract class PhabricatorTypeaheadDatasource extends Phobject { public static function isFunctionToken($token) { // We're looking for a "(" so that a string like "members(q" is identified // and parsed as a function call. This allows us to start generating - // results immeidately, before the user fully types out "members(quack)". + // results immediately, before the user fully types out "members(quack)". return (strpos($token, '(') !== false); } diff --git a/src/applications/uiexample/examples/PhabricatorStatusUIExample.php b/src/applications/uiexample/examples/PhabricatorStatusUIExample.php index 6583bc5848..76a345b8e3 100644 --- a/src/applications/uiexample/examples/PhabricatorStatusUIExample.php +++ b/src/applications/uiexample/examples/PhabricatorStatusUIExample.php @@ -33,7 +33,7 @@ final class PhabricatorStatusUIExample extends PhabricatorUIExample { $view->addItem( id(new PHUIStatusItemView()) ->setIcon(PHUIStatusItemView::ICON_WARNING, 'dark', pht('Caution')) - ->setTarget(pht('Pomegranite')) + ->setTarget(pht('Pomegranate')) ->setNote(pht('Lots of seeds. Watch out.'))); $view->addItem( diff --git a/src/docs/contributor/cla.diviner b/src/docs/contributor/cla.diviner index f08711483a..54e0142beb 100644 --- a/src/docs/contributor/cla.diviner +++ b/src/docs/contributor/cla.diviner @@ -87,7 +87,7 @@ you to consent. If you are not comfortable with this, do not sign the CLA and do not contribute to Phabricator. **Limitation of Liability**: The second benefit the CLA provides is that it -makes the terms of your contribition explicitly clear upfront, and it puts us +makes the terms of your contribution explicitly clear upfront, and it puts us in a much stronger legal position if a contributor later claims there is ambiguity about ownership of their work. We can point at the document they signed as proof that they consented to our use and understood the terms of @@ -100,7 +100,7 @@ anything we are likely to face, but SCO claimed billions of dollars in damages and the litigation has now been ongoing for more than a decade. We want to avoid situations like this in the future by making the terms of -contibution explicit upfront. +contribution explicit upfront. Generally, we believe the terms of the CLA are fair and reasonable for contributors, and that the primary way contributors benefit from contributing @@ -158,7 +158,7 @@ local law. If you are unsure, you should speak with your employer or a lawyer. If you contribute code you do not own under the individual CLA, you are exposing -yourself to liability. You may also be exposing us to liablity, but we'll have +yourself to liability. You may also be exposing us to liability, but we'll have the CLA on our side to show that we were unwilling pawns in your malicious scheme to defraud your employer. diff --git a/src/docs/contributor/describing_problems.diviner b/src/docs/contributor/describing_problems.diviner index 57bb849b02..d06d7b7d64 100644 --- a/src/docs/contributor/describing_problems.diviner +++ b/src/docs/contributor/describing_problems.diviner @@ -140,7 +140,7 @@ Additional Resources Poor problem descriptions are a common issue in software development and extensively documented elsewhere. Here are some additional resources describing -how to describe problems and ask questions effectivey: +how to describe problems and ask questions effectively: - [[ http://www.catb.org/esr/faqs/smart-questions.html | How To Ask Questions The Smart Way ]], by Eric S. Raymond diff --git a/src/docs/contributor/internationalization.diviner b/src/docs/contributor/internationalization.diviner index e9cdb9dfcd..9c78eb60fb 100644 --- a/src/docs/contributor/internationalization.diviner +++ b/src/docs/contributor/internationalization.diviner @@ -198,7 +198,7 @@ would technically be English and most English readers would understand the meaning, but no native English speaker would speak or write like this. However, some languages have different subject-verb order rules or -colloquisalisms, and a word order which transliterates like this may sound more +colloquialisms, and a word order which transliterates like this may sound more natural to a native speaker. By translating fragments instead of complete sentences, you lock translators into English word order. diff --git a/src/docs/contributor/reproduction_steps.diviner b/src/docs/contributor/reproduction_steps.diviner index d5d58913b7..1050e43c48 100644 --- a/src/docs/contributor/reproduction_steps.diviner +++ b/src/docs/contributor/reproduction_steps.diviner @@ -112,7 +112,7 @@ we'll probably be able to follow them and reproduce the issue ourselves. If you can't follow your steps because they depend on information which is not available on a clean instance (for example, a certain config setting), rewrite -them to include instrutions to create that information (for example, adjusting +them to include instructions to create that information (for example, adjusting the config to the problematic value). If you follow your instructions but the issue does not reproduce, the issue @@ -191,7 +191,7 @@ smaller case which reproduces the problem, which might be something like this: - Files like `A`, which have uppercase letters, do not work. With a simpler reproduction scenario, you can simplify your steps to be more -tailored and mimimal. This will help us pointpoint the issue more quickly and +tailored and minimal. This will help us pinpoint the issue more quickly and be more certain that we've understood and resolved it. It is more important that steps be complete than that they be simple, and it's diff --git a/src/docs/user/cluster/cluster.diviner b/src/docs/user/cluster/cluster.diviner index 30ad53efb8..2362b80485 100644 --- a/src/docs/user/cluster/cluster.diviner +++ b/src/docs/user/cluster/cluster.diviner @@ -225,7 +225,7 @@ Cluster: Notifications Configuring multiple notification hosts is simple and has no pre-requisites. With multiple notification hosts, you can survive the loss of any subset of -hosts as long as at least one host remains alive. Service may be breifly +hosts as long as at least one host remains alive. Service may be briefly disrupted directly after the incident which destroys the other hosts. Notifications are noncritical, so this normally has little practical impact diff --git a/src/docs/user/cluster/cluster_databases.diviner b/src/docs/user/cluster/cluster_databases.diviner index 7255662958..51bf14d925 100644 --- a/src/docs/user/cluster/cluster_databases.diviner +++ b/src/docs/user/cluster/cluster_databases.diviner @@ -31,7 +31,7 @@ although this may change in the future. Phabricator applications //can// be partitioned across multiple database masters. This does not provide redundancy and generally does not increase -resiliance or resistance to data loss, but can help you scale and operate +resilience or resistance to data loss, but can help you scale and operate Phabricator. For details, see @{article:Cluster: Partitioning and Advanced Configuration}. diff --git a/src/docs/user/cluster/cluster_devices.diviner b/src/docs/user/cluster/cluster_devices.diviner index 57729fdb86..c90aa220c4 100644 --- a/src/docs/user/cluster/cluster_devices.diviner +++ b/src/docs/user/cluster/cluster_devices.diviner @@ -212,7 +212,7 @@ $ ./bin/almanac register \ For example, you might run this command on `repo001` when using a shared key: ``` -$ ./bin/almanac register +$ ./bin/almanac register \ --device keywarden.mycompany.net \ --private-key /path/to/private-key \ --identify-as repo001.mycompany.net diff --git a/src/docs/user/cluster/cluster_partitioning.diviner b/src/docs/user/cluster/cluster_partitioning.diviner index 4dbb47f9d4..20ae11d6a6 100644 --- a/src/docs/user/cluster/cluster_partitioning.diviner +++ b/src/docs/user/cluster/cluster_partitioning.diviner @@ -21,7 +21,7 @@ This configuration is complex, and very few installs will benefit from pursuing it. Phabricator will normally run comfortably with a single database master even for large organizations. -Partitioning generally does not do much to increase resiliance or make it +Partitioning generally does not do much to increase resilience or make it easier to recover from disasters, and is primarily a mechanism for scaling and operational convenience. @@ -212,14 +212,14 @@ only one master. `persistent` //(bool)// Enables persistent connections. Defaults to off. -With persitent connections enabled, Phabricator will keep a pool of database +With persistent connections enabled, Phabricator will keep a pool of database connections open between web requests and reuse them when serving subsequent requests. The primary benefit of using persistent connections is that it will greatly reduce pressure on how quickly outbound TCP ports are opened and closed. After a TCP port closes, it normally can't be used again for about 60 seconds, so -rapidly cycling ports can cause resource exuastion. If you're seeing failures +rapidly cycling ports can cause resource exhaustion. If you're seeing failures because requests are unable to bind to an outbound port, enabling this option is likely to fix the issue. This option may also slightly increase performance. diff --git a/src/docs/user/cluster/cluster_repositories.diviner b/src/docs/user/cluster/cluster_repositories.diviner index 21aba731cc..44003679af 100644 --- a/src/docs/user/cluster/cluster_repositories.diviner +++ b/src/docs/user/cluster/cluster_repositories.diviner @@ -440,7 +440,7 @@ device or devices have up-to-date information. When Phabricator can not tell which device in a cluster is a leader, it freezes the cluster because it is possible that some devices have less data and others -have more, and if it choses a leader arbitrarily it may destroy some data +have more, and if it chooses a leader arbitrarily it may destroy some data which you would prefer to retain. To resolve this, you need to tell Phabricator which device has the most diff --git a/src/docs/user/cluster/cluster_search.diviner b/src/docs/user/cluster/cluster_search.diviner index c658f50db4..25c35aa34a 100644 --- a/src/docs/user/cluster/cluster_search.diviner +++ b/src/docs/user/cluster/cluster_search.diviner @@ -100,14 +100,14 @@ A typical `mysql` service configuration looks like this: Service Type: Elasticsearch ====================== -The `elasticsearch` sevice type supports these options: +The `elasticsearch` service type supports these options: | Key | Description | |---|---| | `protocol` | Either `"http"` (default) or `"https"`. | `port` | Elasticsearch TCP port. | `version` | Elasticsearch version, either `2` or `5` (default). -| `path` | Path for the index. Defaults to `/phabriator`. Advanced. +| `path` | Path for the index. Defaults to `/phabricator`. Advanced. A typical `elasticsearch` service configuration looks like this: diff --git a/src/docs/user/configuration/configuration_guide.diviner b/src/docs/user/configuration/configuration_guide.diviner index 98c27b9736..8b221bda41 100644 --- a/src/docs/user/configuration/configuration_guide.diviner +++ b/src/docs/user/configuration/configuration_guide.diviner @@ -116,7 +116,7 @@ Restart nginx after making your edits, then continue to "Setup" below. = Webserver: Configuring lighttpd = -NOTE: Follow these instructions to use lighttpd. To use Apache or niginx, scroll +NOTE: Follow these instructions to use lighttpd. To use Apache or nginx, scroll up to their sections. For lighttpd, add a section like this to your lighttpd.conf: @@ -138,7 +138,7 @@ server.modules list: Finally, you should run the following commands to enable php support: - $ sudo apt-get install php5-cgi # for ubuntu; other distros should be similar + $ sudo apt-get install php5-cgi # for Ubuntu; other distros should be similar $ sudo lighty-enable-mod fastcgi-php Restart lighttpd after making your edits, then continue below. diff --git a/src/docs/user/configuration/configuring_backups.diviner b/src/docs/user/configuration/configuring_backups.diviner index d32eebb0da..9c283c5722 100644 --- a/src/docs/user/configuration/configuring_backups.diviner +++ b/src/docs/user/configuration/configuring_backups.diviner @@ -64,7 +64,7 @@ If you host repositories in Phabricator, you should back them up. You can use repository. To back them up, copy them elsewhere. You can also just clone them and keep the clones up to date, or use -{nav Add Mirror} to have the mirror somewhere automatically. +{nav Add Mirror} to have them mirror somewhere automatically. Restore: Hosted Repositories diff --git a/src/docs/user/configuration/configuring_encryption.diviner b/src/docs/user/configuration/configuring_encryption.diviner index dbd0e76314..36315506e6 100644 --- a/src/docs/user/configuration/configuring_encryption.diviner +++ b/src/docs/user/configuration/configuring_encryption.diviner @@ -80,7 +80,7 @@ Format: Raw Data ================ The `raw` storage format is automatically selected for all newly uploaded -file data if no key is makred as the `default` key in the keyring. This is +file data if no key is marked as the `default` key in the keyring. This is the behavior of Phabricator if you haven't configured anything. This format stores raw data without modification. @@ -137,7 +137,7 @@ To change the format of an individual file, run this command: phabricator/ $ ./bin/files encode --as F123 [--key ] ``` -This will change the storage format of the sepcified file. +This will change the storage format of the specified file. Verifying Storage Formats diff --git a/src/docs/user/configuration/managing_garbage.diviner b/src/docs/user/configuration/managing_garbage.diviner index 1896a73904..0b18bd2a0a 100644 --- a/src/docs/user/configuration/managing_garbage.diviner +++ b/src/docs/user/configuration/managing_garbage.diviner @@ -21,7 +21,7 @@ Configuring Retention Policies You can reconfigure the data retention policies for most collectors. -The default retention polcies should be suitable for most installs. However, +The default retention policies should be suitable for most installs. However, you might want to **decrease** retention to reduce the amount of disk space used by some high-volume log that you don't find particularly interesting, or to adhere to an organizational data retention policy. diff --git a/src/docs/user/field/conduit_changes.diviner b/src/docs/user/field/conduit_changes.diviner index a5aa8fef6e..96a890600a 100644 --- a/src/docs/user/field/conduit_changes.diviner +++ b/src/docs/user/field/conduit_changes.diviner @@ -11,7 +11,7 @@ For example, when we write a new application, it usually adds several new API methods and may update older methods. This document discusses API stability and how to minimize disruption when -transitionig between API versions. +transitioning between API versions. Method Statuses diff --git a/src/docs/user/field/darkconsole.diviner b/src/docs/user/field/darkconsole.diviner index a31f0492ae..cbdfb9bda5 100644 --- a/src/docs/user/field/darkconsole.diviner +++ b/src/docs/user/field/darkconsole.diviner @@ -131,7 +131,7 @@ Generally, this column can help pinpoint these kinds of problems: - Unbatched queries which should be batched (see @{article:Performance: N+1 Query Problem}). - Opportunities to improve performance with caching. - - General goofiness in how service calls are woking. + - General goofiness in how service calls are working. If the services tab looks fine, and particularly if a page is slow but the "All Services" cost is small, that may indicate a problem in PHP. The best diff --git a/src/docs/user/field/performance.diviner b/src/docs/user/field/performance.diviner index 09413e47df..c5980acd0e 100644 --- a/src/docs/user/field/performance.diviner +++ b/src/docs/user/field/performance.diviner @@ -34,7 +34,7 @@ Phabricator will need substantial time to process it, it will take a long time to download over the network, and your browser will probably not be able to render it especially quickly. -We may be able to improve perfomance in some cases, but Phabricator is not +We may be able to improve performance in some cases, but Phabricator is not magic and can not wish away real complexity. The best solution to these problems is usually to find another way to solve your problem: for example, maybe the 100MB document can be split into several smaller documents. @@ -51,7 +51,7 @@ The upstream will be less able to help resolve unusual workloads with high inherent complexity, like these: - {icon times, color=red} A 100MB wiki page takes a long time to render. - - {icon times, color=red} A turing-complete simulation of Conway's Game of + - {icon times, color=red} A Turing-complete simulation of Conway's Game of Life implemented in 958,000 Herald rules executes slowly. - {icon times, color=red} Uploading an 8GB file takes several minutes. diff --git a/src/docs/user/field/repository_imports.diviner b/src/docs/user/field/repository_imports.diviner index 495758ea4a..1b1c92bbc0 100644 --- a/src/docs/user/field/repository_imports.diviner +++ b/src/docs/user/field/repository_imports.diviner @@ -127,7 +127,7 @@ may have briefly been down, or some configuration wasn't quite right, or the daemons were killed halfway through the work. These commits will retry eventually and usually succeed, but some of the retry -time limits are very conserative (up to 24 hours) and you might not want to +time limits are very conservative (up to 24 hours) and you might not want to wait that long. In the Daemon console, temporarily failures usually look like tasks in the @@ -137,7 +137,7 @@ waiting to retry these tasks. In the daemon log, these temporary failures might have created log entries, but might also not have. For example, if the failure was rooted in a network issue -that probably will create a log entry, but if the faiulre was rooted in the +that probably will create a log entry, but if the failure was rooted in the daemons being abruptly killed that may not create a log entry. You can follow the instructions from "Handling Permanent Failures" above to @@ -167,7 +167,7 @@ Forced Parsing ============== In rare cases, the actual tasks may be lost from the task queue. Usually, they -have been stolen by gremlins or spritied away by ghosts, or someone may have +have been stolen by gremlins or spirited away by ghosts, or someone may have been too ambitious with running manual SQL commands and deleted a bunch of extra things they shouldn't have. @@ -226,7 +226,7 @@ General Tips ============ Broadly, `bin/repository` contains several useful debugging commands which -let you figure out where failures are occuring. You can add the `--trace` flag +let you figure out where failures are occurring. You can add the `--trace` flag to any command to get more details about what it is doing. For any command, you can use `help` to learn more about what it does and which flag it takes: diff --git a/src/docs/user/field/xhprof.diviner b/src/docs/user/field/xhprof.diviner index 7d032e6865..ad6fe82cb8 100644 --- a/src/docs/user/field/xhprof.diviner +++ b/src/docs/user/field/xhprof.diviner @@ -88,7 +88,7 @@ that you're looking at a problem which is deeper in the stack, and you need to go down further to identify and understand it. Conversely, if the "Wall Time (Exclusive)" column is large, or the children -of a call are all cheap, there's probably something expesive happening in the +of a call are all cheap, there's probably something expensive happening in the call itself. The "Count" column can also sometimes tip you off that something is amiss, if diff --git a/src/docs/user/userguide/almanac.diviner b/src/docs/user/userguide/almanac.diviner index d6f0853430..9250724c03 100644 --- a/src/docs/user/userguide/almanac.diviner +++ b/src/docs/user/userguide/almanac.diviner @@ -122,7 +122,7 @@ Each service has a name, and may have properties and bindings. **Bindings**: Bindings are connections between services and interfaces. They tell callers which devices host a named service. -**Networks**: Networks allow Almanac to distingiush between addresses on +**Networks**: Networks allow Almanac to distinguish between addresses on different networks, like VPNs vs the public internet. If you have hosts in different VPNs or on private networks, you might have diff --git a/src/docs/user/userguide/arcanist.diviner b/src/docs/user/userguide/arcanist.diviner index 324ff10490..f6ccc3550f 100644 --- a/src/docs/user/userguide/arcanist.diviner +++ b/src/docs/user/userguide/arcanist.diviner @@ -3,7 +3,7 @@ Guide to Arcanist, a command-line interface to Phabricator. -Arcanists provides command-line access to many Phabricator tools (like +Arcanist provides command-line access to many Phabricator tools (like Differential, Files, and Paste), integrates with static analysis ("lint") and unit tests, and manages common workflows like getting changes into Differential for review. diff --git a/src/docs/user/userguide/arcanist_lint.diviner b/src/docs/user/userguide/arcanist_lint.diviner index d7fcce14e8..460b8f85b6 100644 --- a/src/docs/user/userguide/arcanist_lint.diviner +++ b/src/docs/user/userguide/arcanist_lint.diviner @@ -169,7 +169,7 @@ Normally, you will be presented with lint messages as you are sending code for review. In that context, the severities behave like this: - `error` When a file contains lint errors, they are always reported. These - are intended to be severe problems, like a syntax error. Unresoved lint + are intended to be severe problems, like a syntax error. Unresolved lint errors require you to confirm that you want to continue. - `warning` When a file contains warnings, they are reported by default only if they appear on lines that you have changed. They are intended to be diff --git a/src/docs/user/userguide/calendar_exports.diviner b/src/docs/user/userguide/calendar_exports.diviner index 340cff863d..487de559a4 100644 --- a/src/docs/user/userguide/calendar_exports.diviner +++ b/src/docs/user/userguide/calendar_exports.diviner @@ -61,7 +61,7 @@ To export a group of events: - Example: All events tagged `#meetup`. - Select the {nav Use Results... > Export Query as .ics} action to turn the query into an export. - - Name the export with a descritive name. + - Name the export with a descriptive name. - Select a policy mode for the export (see below for discussion). - Click {nav Create New Export} to finish the process. diff --git a/src/docs/user/userguide/calendar_imports.diviner b/src/docs/user/userguide/calendar_imports.diviner index a4163e9bcd..a8fbc6ff09 100644 --- a/src/docs/user/userguide/calendar_imports.diviner +++ b/src/docs/user/userguide/calendar_imports.diviner @@ -10,7 +10,7 @@ IMPORTANT: Calendar is a prototype application. See @{article:User Guide: Prototype Applications}. You can import events into Phabricator to other calendar applications or from -`.ics` files. This document will guide you through how to importe event data +`.ics` files. This document will guide you through how to import event data into Phabricator. When you import events from another application, they can not be edited in diff --git a/src/docs/user/userguide/conduit_edit.diviner b/src/docs/user/userguide/conduit_edit.diviner index 01d15873a8..5188300e6d 100644 --- a/src/docs/user/userguide/conduit_edit.diviner +++ b/src/docs/user/userguide/conduit_edit.diviner @@ -37,7 +37,7 @@ Editing Objects To edit objects, pass a list of transactions and use `objectIdentifier` to specify which object to apply them to. You can normally pass an ID or PHID, -and many applicaitons also allow you to pass a monogram (for example, you can +and many applications also allow you to pass a monogram (for example, you can edit a task by passing `T123`). diff --git a/src/docs/user/userguide/diffusion_api.diviner b/src/docs/user/userguide/diffusion_api.diviner index f57d5007aa..c2508dda72 100644 --- a/src/docs/user/userguide/diffusion_api.diviner +++ b/src/docs/user/userguide/diffusion_api.diviner @@ -147,7 +147,7 @@ Activate the Repository ======================= Now that any URIs have been configured, activate the repository with another -call to `diffusion.repository.edit`. This time, modify the existing repostitory +call to `diffusion.repository.edit`. This time, modify the existing repository instead of creating a new one: ``` diff --git a/src/docs/user/userguide/diffusion_hosting.diviner b/src/docs/user/userguide/diffusion_hosting.diviner index 2443b475e8..47197f52fd 100644 --- a/src/docs/user/userguide/diffusion_hosting.diviner +++ b/src/docs/user/userguide/diffusion_hosting.diviner @@ -151,7 +151,7 @@ vcs-user ALL=(daemon-user) SETENV: NOPASSWD: /path/to/x, /path/to/y, ... This is just a template. In the real configuration file, you need to: - - Replace `www-user`, `dameon-user` and `vcs-user` with the correct + - Replace `www-user`, `daemon-user` and `vcs-user` with the correct usernames for your system. - List every binary that these users need access to, as described above. - Make sure each binary path is the full path to the correct binary location diff --git a/src/docs/user/userguide/diffusion_managing.diviner b/src/docs/user/userguide/diffusion_managing.diviner index f6ab0997c4..cc03433532 100644 --- a/src/docs/user/userguide/diffusion_managing.diviner +++ b/src/docs/user/userguide/diffusion_managing.diviner @@ -121,7 +121,7 @@ It is normally a good idea to leave this protection enabled because most scalable workflows rarely rewrite repository history and it's easy to make mistakes which are expensive to correct if this protection is disabled. -If you do occasionally need to rewite published history, you can treat this +If you do occasionally need to rewrite published history, you can treat this option like a safety: disable it, perform required rewrites, then enable it again. @@ -148,7 +148,7 @@ Repositories can be deactivated. Deactivating a repository has these effects: - the repository will be hidden from view in default queries. When repositories are created for the first time, they are deactivated. This -gives you an opportuinty to customize settings, like adjusting policies or +gives you an opportunity to customize settings, like adjusting policies or configuring a URI to observe. You must activate a repository before it will start working normally. @@ -177,7 +177,7 @@ The **Policies** section of the management interface allows you to review and manage repository access policies. You can configure granular access policies for each repository to control who -can view, clone, administate, and push to the repository. +can view, clone, administrate, and push to the repository. Policies: View @@ -302,7 +302,7 @@ Actions The **Actions** panel can configure notifications and publishing behavior. Normally, Phabricator publishes notifications when it discovers new commits. -You can disable publishing for a repository by turning off **Publish/Noitfy**. +You can disable publishing for a repository by turning off **Publish/Notify**. This will disable notifications, feed, and Herald (including audits and build plans) for this repository. @@ -347,7 +347,7 @@ Commit Identifiers ================== Diffusion uses repository identifiers and information about the commit itself -to generate globally unique identifers for each commit, like `rE12345`. +to generate globally unique identifiers for each commit, like `rE12345`. Each commit may have several identifiers: diff --git a/src/docs/user/userguide/diffusion_uris.diviner b/src/docs/user/userguide/diffusion_uris.diviner index d1f4b541bc..140948f55e 100644 --- a/src/docs/user/userguide/diffusion_uris.diviner +++ b/src/docs/user/userguide/diffusion_uris.diviner @@ -20,7 +20,7 @@ is hosted elsewhere (like GitHub or Bitbucket) and track updates to the remote repository. This will create a read-only copy of the repository in Phabricator. **Mirror Repositories**: Phabricator can publish any repository to mirrors, -overwiting them with an exact copy of the repository that stays up to date as +overwriting them with an exact copy of the repository that stays up to date as the source changes. This works with both local repositories that Phabricator is hosting and remote repositories that Phabricator is observing. @@ -293,7 +293,7 @@ For builtin URIs in //Read Only// or //Read/Write// mode, the most human-readable URI defaults to //Always// and the others default to //Never//. **Always**: This URI will be shown to users as a clone/checkout URI. You can -add URIs in this mode to cutomize exactly what users are shown. +add URIs in this mode to customize exactly what users are shown. **Never**: This URI will not be shown to users. You can hide less-preferred URIs to guide users to the URIs they should be using to interact with the diff --git a/src/docs/user/userguide/drydock.diviner b/src/docs/user/userguide/drydock.diviner index 44a645bf8a..0d43f7f3f0 100644 --- a/src/docs/user/userguide/drydock.diviner +++ b/src/docs/user/userguide/drydock.diviner @@ -151,7 +151,7 @@ thousands of hosts in hundreds of pools, and far beyond that with a little work. Drydock is intended to solve resource management problems at very large scales -and minimzes blocking operations, locks, and artificial sequencing. Drydock is +and minimizes blocking operations, locks, and artificial sequencing. Drydock is designed to fully utilize an almost arbitrarily large pool of resources and improve performance roughly linearly with available hardware. diff --git a/src/docs/user/userguide/drydock_blueprints.diviner b/src/docs/user/userguide/drydock_blueprints.diviner index 21c4342fa6..c150c503d9 100644 --- a/src/docs/user/userguide/drydock_blueprints.diviner +++ b/src/docs/user/userguide/drydock_blueprints.diviner @@ -47,7 +47,7 @@ operations on trusted hosts. For additional discussion, see This also broadly prevents Drydock from surprising you by coming up with a valid but unintended solution to an allocation problem which runs some -operation on resources that are techincally suitable but not desirable. For +operation on resources that are technically suitable but not desirable. For example, you may not want your Android builds running on your iPhone build tier, even if there's no technical reason they can't. diff --git a/src/docs/user/userguide/drydock_security.diviner b/src/docs/user/userguide/drydock_security.diviner index f12586ab35..9a212437c7 100644 --- a/src/docs/user/userguide/drydock_security.diviner +++ b/src/docs/user/userguide/drydock_security.diviner @@ -141,7 +141,7 @@ host which is not on a privileged subnet. For example, use a Even if the host is not privileged, many Drydock processes have some level of privilege (enabling them to clone repositories, or report test results back to Phabricator). Be aware that tests can hijack credentials they are run with, -and potentialy hijack credentials given to other processes on the same hosts. +and potentially hijack credentials given to other processes on the same hosts. You should use credentials with a minimum set of privileges and assume all processes on a host have the highest level of access that any process on the host has. diff --git a/src/docs/user/userguide/forms.diviner b/src/docs/user/userguide/forms.diviner index 98233e4931..034293ff29 100644 --- a/src/docs/user/userguide/forms.diviner +++ b/src/docs/user/userguide/forms.diviner @@ -34,7 +34,7 @@ objects, which will also affect their ability to take inline actions in the comment form if you're working in an application which supports comments. This can streamline the edit workflow for less experienced users. -Anyone can use prefiling, but you must have permission to configure an +Anyone can use prefilling, but you must have permission to configure an application in order to modify the application's forms. By default, only administrators can configure applications. diff --git a/src/docs/user/userguide/herald.diviner b/src/docs/user/userguide/herald.diviner index 6c5c6239cb..c5a008474d 100644 --- a/src/docs/user/userguide/herald.diviner +++ b/src/docs/user/userguide/herald.diviner @@ -126,7 +126,7 @@ match the content. You can use these together to express conditions like For example, if you want to match revisions which add or remove calls to a "muffinize" function, //but only in JS files//, you can set the value to `["/\\.js$/", "/muffinize/"]` or similar. This condition is satisfied only -when the filename matches the first expression and the conent matches the +when the filename matches the first expression and the content matches the second expression. **Another Herald rule**: you can create Herald rules which depend on other diff --git a/src/docs/user/userguide/jump.diviner b/src/docs/user/userguide/jump.diviner index 413c4fa47b..0421f194a8 100644 --- a/src/docs/user/userguide/jump.diviner +++ b/src/docs/user/userguide/jump.diviner @@ -1,7 +1,7 @@ @title Search User Guide: Shortcuts @group userguide -Command reference for global search shorcuts. +Command reference for global search shortcuts. Overview ======== diff --git a/src/docs/user/userguide/owners.diviner b/src/docs/user/userguide/owners.diviner index a9a52bfab8..f30fe5023c 100644 --- a/src/docs/user/userguide/owners.diviner +++ b/src/docs/user/userguide/owners.diviner @@ -24,7 +24,7 @@ including these paths: Any files in those directories are considered to be part of the package, and you can now conveniently refer to them (for example, in a Herald rule) by -refering to the package instead of copy/pasting a huge regular expression +referring to the package instead of copy/pasting a huge regular expression into a bunch of places. If new source files are later added, or the scope of the package otherwise diff --git a/src/docs/user/userguide/projects.diviner b/src/docs/user/userguide/projects.diviner index 573c8c4c69..4e3ab3616f 100644 --- a/src/docs/user/userguide/projects.diviner +++ b/src/docs/user/userguide/projects.diviner @@ -14,7 +14,7 @@ a name and an icon, and may optionally have members. For example, you can create projects to provide: - - **Organization**: Create a project to represent a product or initative, + - **Organization**: Create a project to represent a product or initiative, then use it to organize related work. - **Groups**: Create a project to represent a group of people (like a team), then add members of the group as project members. diff --git a/src/docs/user/userguide/remarkup.diviner b/src/docs/user/userguide/remarkup.diviner index 6002867b78..28a1a31fc4 100644 --- a/src/docs/user/userguide/remarkup.diviner +++ b/src/docs/user/userguide/remarkup.diviner @@ -366,7 +366,7 @@ can be found on the date stamp of any transaction/comment): T123#412 # Link to comment id #412 of task T123 -See the Phabricator configuraton setting `remarkup.ignored-object-names` to +See the Phabricator configuration setting `remarkup.ignored-object-names` to modify this behavior. = Embedding Objects diff --git a/src/docs/user/userguide/search.diviner b/src/docs/user/userguide/search.diviner index 875edc6d0f..d1c6182128 100644 --- a/src/docs/user/userguide/search.diviner +++ b/src/docs/user/userguide/search.diviner @@ -87,7 +87,7 @@ view show the results you most often want. You can share queries with other users by sending them the URL. This will run the same query for them with all the parameters you've set (they may see -different results than you do, because they may not have the same permisions). +different results than you do, because they may not have the same permissions). Typeaheads diff --git a/src/docs/user/userguide/spaces.diviner b/src/docs/user/userguide/spaces.diviner index 212def61f3..4a748fb25b 100644 --- a/src/docs/user/userguide/spaces.diviner +++ b/src/docs/user/userguide/spaces.diviner @@ -70,7 +70,7 @@ spaces exist. This simplifies the UI for users with limited access. Space Policies ============== -Briefly, spacess affect policies like this: +Briefly, spaces affect policies like this: - Spaces apply their view policy to all objects inside the space. - Space policies are absolute, and stronger than all other policies. A diff --git a/src/docs/user/userguide/users.diviner b/src/docs/user/userguide/users.diviner index e96bf8f354..d66f8080d3 100644 --- a/src/docs/user/userguide/users.diviner +++ b/src/docs/user/userguide/users.diviner @@ -73,7 +73,7 @@ The **Mailing List** role for an account can not be changed after the account is created. Some options can be configured for mailing lists by browsing to the list user's -profile and clicking {nav Edit Settings}. You can change the addresss for a +profile and clicking {nav Edit Settings}. You can change the address for a list by editing "Email Addresses" here, choose the language and format for email the list receives, and customize which actions the list is notified about. diff --git a/src/infrastructure/customfield/field/PhabricatorCustomFieldList.php b/src/infrastructure/customfield/field/PhabricatorCustomFieldList.php index cb1e56711d..efe12e68b8 100644 --- a/src/infrastructure/customfield/field/PhabricatorCustomFieldList.php +++ b/src/infrastructure/customfield/field/PhabricatorCustomFieldList.php @@ -160,7 +160,7 @@ final class PhabricatorCustomFieldList extends Phobject { if ($value !== null) { switch ($field->getStyleForPropertyView()) { case 'header': - // We want to hide headers if the fields the're assciated with + // We want to hide headers if the fields they're associated with // don't actually produce any visible properties. For example, in a // list like this: // diff --git a/src/infrastructure/daemon/workers/query/PhabricatorWorkerTriggerQuery.php b/src/infrastructure/daemon/workers/query/PhabricatorWorkerTriggerQuery.php index c569f0c695..a8dc5061e7 100644 --- a/src/infrastructure/daemon/workers/query/PhabricatorWorkerTriggerQuery.php +++ b/src/infrastructure/daemon/workers/query/PhabricatorWorkerTriggerQuery.php @@ -5,7 +5,7 @@ final class PhabricatorWorkerTriggerQuery // NOTE: This is a PolicyAware query so it can work with other infrastructure // like handles; triggers themselves are low-level and do not have - // meaninguful policies. + // meaningful policies. const ORDER_ID = 'id'; const ORDER_EXECUTION = 'execution'; @@ -69,7 +69,7 @@ final class PhabricatorWorkerTriggerQuery protected function nextPage(array $page) { // NOTE: We don't implement paging because we don't currently ever need - // it and paging ORDER_EXCUTION is a hassle. + // it and paging ORDER_EXECUTION is a hassle. throw new PhutilMethodNotImplementedException(); } diff --git a/src/infrastructure/diff/view/PHUIDiffGraphView.php b/src/infrastructure/diff/view/PHUIDiffGraphView.php index 76ae0b2045..85741faab7 100644 --- a/src/infrastructure/diff/view/PHUIDiffGraphView.php +++ b/src/infrastructure/diff/view/PHUIDiffGraphView.php @@ -160,7 +160,7 @@ final class PHUIDiffGraphView extends Phobject { $terminated[$ii] = true; - // If this thread is joinining some other node here, we don't want + // If this thread is joining some other node here, we don't want // to terminate it. if (isset($graph[$key + 1])) { $joins = $graph[$key + 1]['join']; diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentTableScaffold.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentTableScaffold.php index 5da25389a5..94eb91ec58 100644 --- a/src/infrastructure/diff/view/PHUIDiffInlineCommentTableScaffold.php +++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentTableScaffold.php @@ -4,7 +4,7 @@ * Wraps an inline comment row scaffold in a table. * * This scaffold is used to ship inlines over the wire to the client, so they - * arrive in a form that's easy to mainipulate (a valid table node). + * arrive in a form that's easy to manipulate (a valid table node). */ final class PHUIDiffInlineCommentTableScaffold extends AphrontView { diff --git a/src/infrastructure/env/PhabricatorEnv.php b/src/infrastructure/env/PhabricatorEnv.php index 70ddb80630..ba05d0409d 100644 --- a/src/infrastructure/env/PhabricatorEnv.php +++ b/src/infrastructure/env/PhabricatorEnv.php @@ -670,7 +670,7 @@ final class PhabricatorEnv extends Phobject { * Detect if a URI identifies some valid linkable remote resource. * * @param string URI to test. - * @return bool True if a URI idenfies a remote resource with an allowed + * @return bool True if a URI identifies a remote resource with an allowed * protocol. * @task uri */ diff --git a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php index 95ba57f0c0..184c2d5151 100644 --- a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php +++ b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php @@ -730,7 +730,7 @@ final class PhabricatorUSEnglishTranslation '%s added %s reverting commit(s) for %s: %s.' => array( array( '%s added a reverting commit for %3$s: %4$s.', - '%s added reverting commitsi for %3$s: %4$s.', + '%s added reverting commits for %3$s: %4$s.', ), ), @@ -1564,7 +1564,7 @@ final class PhabricatorUSEnglishTranslation '%s uninvited %s attendee(s): %s.' => '%s uninvited: %3$s.', - '%s invited %s attendee(s): %s; uninvinted %s attendee(s): %s.' => + '%s invited %s attendee(s): %s; uninvited %s attendee(s): %s.' => '%s invited: %3$s; uninvited: %5$s.', '%s invited %s attendee(s) to %s: %s.' => @@ -1573,7 +1573,7 @@ final class PhabricatorUSEnglishTranslation '%s uninvited %s attendee(s) to %s: %s.' => '%s removed invites for %3$s: %4$s.', - '%s updated the invite list for %s, invited %s: %s; uninvinted %s: %s.' => + '%s updated the invite list for %s, invited %s: %s; uninvited %s: %s.' => '%s updated the invite list for %s, invited: %4$s; uninvited: %6$s.', 'Restart %s build(s)?' => array( diff --git a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php index c2b8ce04e0..9bebfe6957 100644 --- a/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php +++ b/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php @@ -175,7 +175,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery * So, generally, internal paging must bypass policy controls. * * This method returns the appropriate viewer, based on the context in which - * the paging is occuring. + * the paging is occurring. * * @return PhabricatorUser Viewer for executing paging queries. */ @@ -536,7 +536,7 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery * * @param AphrontDatabaseConnection Connection query will execute on. * @param list Column description dictionaries. - * @param map Additional constuction options. + * @param map Additional construction options. * @return string Query clause. * @task paging */ diff --git a/src/infrastructure/storage/lisk/LiskDAO.php b/src/infrastructure/storage/lisk/LiskDAO.php index 94eef7d163..0c940ef5f0 100644 --- a/src/infrastructure/storage/lisk/LiskDAO.php +++ b/src/infrastructure/storage/lisk/LiskDAO.php @@ -1121,7 +1121,7 @@ abstract class LiskDAO extends Phobject { $this->willSaveObject(); $data = $this->getAllLiskPropertyValues(); - // Remove colums flagged as nonmutable from the update statement. + // Remove columns flagged as nonmutable from the update statement. $no_mutate = $this->getConfigOption(self::CONFIG_NO_MUTATE); if ($no_mutate) { foreach ($no_mutate as $column) { diff --git a/src/infrastructure/storage/lisk/__tests__/LiskFixtureTestCase.php b/src/infrastructure/storage/lisk/__tests__/LiskFixtureTestCase.php index 065c23e2ff..92c43fcd4b 100644 --- a/src/infrastructure/storage/lisk/__tests__/LiskFixtureTestCase.php +++ b/src/infrastructure/storage/lisk/__tests__/LiskFixtureTestCase.php @@ -98,7 +98,7 @@ final class LiskFixtureTestCase extends PhabricatorTestCase { $obj = new HarbormasterObject(); $conn_w = $obj->establishConnection('w'); - // Test that the counter bascially behaves as expected. + // Test that the counter basically behaves as expected. $this->assertEqual(1, LiskDAO::loadNextCounterValue($conn_w, 'a')); $this->assertEqual(2, LiskDAO::loadNextCounterValue($conn_w, 'a')); $this->assertEqual(3, LiskDAO::loadNextCounterValue($conn_w, 'a')); diff --git a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php index a03ef41c4d..f6b120ba83 100644 --- a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php +++ b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php @@ -181,8 +181,8 @@ abstract class PhabricatorStorageManagementWorkflow if (!$this->force && !$api->isCharacterSetAvailable('utf8mb4')) { $message = pht( "You have an old version of MySQL (older than 5.5) which does not ". - "support the utf8mb4 character set. We strongly recomend upgrading to ". - "5.5 or newer.\n\n". + "support the utf8mb4 character set. We strongly recommend upgrading ". + "to 5.5 or newer.\n\n". "If you apply adjustments now and later update MySQL to 5.5 or newer, ". "you'll need to apply adjustments again (and they will take a long ". "time).\n\n". diff --git a/src/infrastructure/util/PhabricatorHash.php b/src/infrastructure/util/PhabricatorHash.php index 19c8414539..5ca4e9b53c 100644 --- a/src/infrastructure/util/PhabricatorHash.php +++ b/src/infrastructure/util/PhabricatorHash.php @@ -11,7 +11,7 @@ final class PhabricatorHash extends Phobject { * weak. Callers should prefer @{method:digestWithNamedKey}. * * @param string Input string. - * @return string 32-byte hexidecimal SHA1+HMAC hash. + * @return string 32-byte hexadecimal SHA1+HMAC hash. */ public static function weakDigest($string, $key = null) { if ($key === null) { diff --git a/src/infrastructure/util/password/PhabricatorPasswordHasher.php b/src/infrastructure/util/password/PhabricatorPasswordHasher.php index 7972acc0a8..f0f30045c0 100644 --- a/src/infrastructure/util/password/PhabricatorPasswordHasher.php +++ b/src/infrastructure/util/password/PhabricatorPasswordHasher.php @@ -70,7 +70,7 @@ abstract class PhabricatorPasswordHasher extends Phobject { /** * Return an indicator of this hasher's strength. When choosing to hash - * new passwords, the strongest available hasher which is usuable for new + * new passwords, the strongest available hasher which is usable for new * passwords will be used, and the presence of a stronger hasher will * prompt users to update their hashes. * @@ -208,7 +208,7 @@ abstract class PhabricatorPasswordHasher extends Phobject { * Get all available password hashers. This may include hashers which can not * actually be used (for example, a required extension is missing). * - * @return list Hasher objects. + * @return list Hasher objects. * @task hashing */ public static function getAllHashers() { @@ -243,7 +243,7 @@ abstract class PhabricatorPasswordHasher extends Phobject { * Get all usable password hashers. This may include hashers which are * not desirable or advisable. * - * @return list Hasher objects. + * @return list Hasher objects. * @task hashing */ public static function getAllUsableHashers() { @@ -280,7 +280,7 @@ abstract class PhabricatorPasswordHasher extends Phobject { /** - * Get the hashser for a given stored hash. + * Get the hasher for a given stored hash. * * @return PhabricatorPasswordHasher Corresponding hasher. * @task hashing diff --git a/src/view/AphrontView.php b/src/view/AphrontView.php index c014d7d50c..669742f29b 100644 --- a/src/view/AphrontView.php +++ b/src/view/AphrontView.php @@ -42,7 +42,7 @@ abstract class AphrontView extends Phobject /** - * Test if a viewer has been set on this elmeent. + * Test if a viewer has been set on this element. * * @return bool True if a viewer is available. */ diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php index d26cca945f..78ff716a44 100644 --- a/src/view/page/PhabricatorStandardPageView.php +++ b/src/view/page/PhabricatorStandardPageView.php @@ -272,7 +272,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView 'doc_href' => $doc_href, 'message' => pht( 'Phabricator thinks you are using %s, but your '. - 'client is conviced that it is using %s. This is a serious '. + 'client is convinced that it is using %s. This is a serious '. 'misconfiguration with subtle, but significant, consequences.', $server_protocol, $client_protocol), )); diff --git a/src/view/phui/PHUIHeaderView.php b/src/view/phui/PHUIHeaderView.php index dc836f3d3a..53ec096265 100644 --- a/src/view/phui/PHUIHeaderView.php +++ b/src/view/phui/PHUIHeaderView.php @@ -166,7 +166,7 @@ final class PHUIHeaderView extends AphrontTagView { $classes[] = 'phui-header-shell'; if ($this->noBackground) { - $classes[] = 'phui-header-no-backgound'; + $classes[] = 'phui-header-no-background'; } if ($this->bleedHeader) { diff --git a/webroot/rsrc/css/phui/phui-document.css b/webroot/rsrc/css/phui/phui-document.css index e5985f8889..954a220229 100644 --- a/webroot/rsrc/css/phui/phui-document.css +++ b/webroot/rsrc/css/phui/phui-document.css @@ -35,13 +35,13 @@ } .phui-document-content - .phui-header-shell.phui-header-no-backgound { + .phui-header-shell.phui-header-no-background { border-bottom: 1px solid {$thinblueborder}; margin: 0 0 16px 0; } .phui-document-content - .phui-header-shell.phui-header-no-backgound + .phui-header-shell.phui-header-no-background .phui-header-view { padding: 8px 0 4px; } diff --git a/webroot/rsrc/css/phui/phui-header-view.css b/webroot/rsrc/css/phui/phui-header-view.css index 18b1464e53..478dde2153 100644 --- a/webroot/rsrc/css/phui/phui-header-view.css +++ b/webroot/rsrc/css/phui/phui-header-view.css @@ -34,7 +34,7 @@ vertical-align: middle; } -body .phui-header-shell.phui-header-no-backgound { +body .phui-header-shell.phui-header-no-background { background-color: transparent; border: none; } diff --git a/webroot/rsrc/js/application/conpherence/behavior-menu.js b/webroot/rsrc/js/application/conpherence/behavior-menu.js index a5566dc5a4..43488ce4ff 100644 --- a/webroot/rsrc/js/application/conpherence/behavior-menu.js +++ b/webroot/rsrc/js/application/conpherence/behavior-menu.js @@ -94,7 +94,7 @@ JX.behavior('conpherence-menu', function(config) { var _oldDevice = null; /** - * Initializes this behavior based on all the configuraton jonx and the + * Initializes this behavior based on all the configuration jonx and the * result of JX.Device.getDevice(); */ function init() { diff --git a/webroot/rsrc/js/application/conpherence/behavior-participant-pane.js b/webroot/rsrc/js/application/conpherence/behavior-participant-pane.js index 8c9fc056f4..e428cbdbce 100644 --- a/webroot/rsrc/js/application/conpherence/behavior-participant-pane.js +++ b/webroot/rsrc/js/application/conpherence/behavior-participant-pane.js @@ -69,7 +69,7 @@ JX.behavior('conpherence-participant-pane', function() { // While the user is removing themselves, disable the notification // update behavior. If we don't do this, the user can get an error // when they remove themselves about permissions as the notification - // code tries to load what jist happened. + // code tries to load what just happened. var loadedPhid = threadManager.getLoadedThreadPHID(); threadManager.setLoadedThreadPHID(null); diff --git a/webroot/rsrc/js/application/diffusion/DiffusionLocateFileSource.js b/webroot/rsrc/js/application/diffusion/DiffusionLocateFileSource.js index 14894f6cc0..1f94f349d3 100644 --- a/webroot/rsrc/js/application/diffusion/DiffusionLocateFileSource.js +++ b/webroot/rsrc/js/application/diffusion/DiffusionLocateFileSource.js @@ -260,7 +260,7 @@ JX.install('DiffusionLocateFileSource', { /** * Score a matching string by finding the longest prefix of the search - * query it contains continguously. + * query it contains contiguously. */ scoreMatch: function(haystack, haypos, search) { var pos = 0; diff --git a/webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js b/webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js index 3991f4cc4e..0a02aebce7 100644 --- a/webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js +++ b/webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js @@ -201,7 +201,7 @@ JX.behavior('pholio-mock-view', function(config, statics) { } function render_image_header(image) { - // Render image dimensions and visible size. If we have this infomation + // Render image dimensions and visible size. If we have this information // from the server we can display some of it immediately; otherwise, we need // to wait for the image to load so we can read dimension information from // it. diff --git a/webroot/rsrc/js/core/Prefab.js b/webroot/rsrc/js/core/Prefab.js index c5a8ef5e9d..979ad3473b 100644 --- a/webroot/rsrc/js/core/Prefab.js +++ b/webroot/rsrc/js/core/Prefab.js @@ -184,7 +184,7 @@ JX.install('Prefab', { var self_hits = {}; // We'll put matches where the user's input is a prefix of the name - // above mathches where that isn't true. + // above matches where that isn't true. var prefix_hits = {}; var tokens = this.tokenize(value); @@ -212,7 +212,7 @@ JX.install('Prefab', { } // If one result is open and one is closed, show the open result - // first. The "!" tricks here are becaused closed values are display + // first. The "!" tricks here are because closed values are display // strings, so the value is either `null` or some truthy string. If // we compare the values directly, we'll apply this rule to two // objects which are both closed but for different reasons, like diff --git a/webroot/rsrc/js/core/behavior-device.js b/webroot/rsrc/js/core/behavior-device.js index d74939a7e0..d68a46ff4e 100644 --- a/webroot/rsrc/js/core/behavior-device.js +++ b/webroot/rsrc/js/core/behavior-device.js @@ -27,7 +27,7 @@ JX.install('Device', { var self = JX.Device; // Even when we emit a '' tag which tells - // devices to fit the conent to the screen width, we'll sometimes measure + // devices to fit the content to the screen width, we'll sometimes measure // a viewport dimension which is larger than the available screen width, // particularly if we check too early. diff --git a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js index df4a031377..a7f719dab4 100644 --- a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js +++ b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js @@ -543,7 +543,7 @@ JX.install('PHUIXAutocomplete', { // If the input is terminated by a space or another word-terminating // punctuation mark, we're going to deactivate if the results can not - // be refined by addding more words. + // be refined by adding more words. // The idea is that if you type "@alan ab", you're allowed to keep // editing "ab" until you type a space, period, or other terminator, diff --git a/webroot/rsrc/js/phuix/PHUIXDropdownMenu.js b/webroot/rsrc/js/phuix/PHUIXDropdownMenu.js index 3f93c1ee41..d9d86bf595 100644 --- a/webroot/rsrc/js/phuix/PHUIXDropdownMenu.js +++ b/webroot/rsrc/js/phuix/PHUIXDropdownMenu.js @@ -124,7 +124,7 @@ JX.install('PHUIXDropdownMenu', { } // If this action was built dynamically with PHUIXActionView, don't - // do anything by default. The caller is repsonsible for installing a + // do anything by default. The caller is responsible for installing a // handler if they want to react to clicks. if (e.getNode('phuix-action-view')) { return; From b583093186974272188c9403cfd57a7179a3ecab Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 9 Oct 2017 10:52:27 -0700 Subject: [PATCH 04/11] Fix Celerity map definition after spelling corrections See D18693. --- resources/celerity/map.php | 196 ++++++++++++++++++------------------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 6c7d2db90c..ce069dbd11 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -8,9 +8,9 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'e68cf1fa', - 'conpherence.pkg.js' => 'b5b51108', - 'core.pkg.css' => '87a9a59b', - 'core.pkg.js' => '28552e58', + 'conpherence.pkg.js' => '15191c65', + 'core.pkg.css' => '1a4e0c25', + 'core.pkg.js' => '4c79d74f', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '45951e9e', 'differential.pkg.js' => 'b71b8c5d', @@ -151,13 +151,13 @@ return array( 'rsrc/css/phui/phui-curtain-view.css' => '2bdaf026', 'rsrc/css/phui/phui-document-pro.css' => '8af7ea27', 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', - 'rsrc/css/phui/phui-document.css' => 'c32e8dec', + 'rsrc/css/phui/phui-document.css' => '878c2f52', 'rsrc/css/phui/phui-feed-story.css' => '44a9c8e9', 'rsrc/css/phui/phui-fontkit.css' => '1320ed01', 'rsrc/css/phui/phui-form-view.css' => 'ae9f8d16', 'rsrc/css/phui/phui-form.css' => '7aaa04e3', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', - 'rsrc/css/phui/phui-header-view.css' => '67fab16d', + 'rsrc/css/phui/phui-header-view.css' => '31dc6c72', 'rsrc/css/phui/phui-hovercard.css' => 'f0592bcf', 'rsrc/css/phui/phui-icon-set-selector.css' => '87db8fee', 'rsrc/css/phui/phui-icon.css' => '5c4a5de6', @@ -384,8 +384,8 @@ return array( 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '4d863052', 'rsrc/js/application/conpherence/behavior-conpherence-search.js' => '9bbf3762', 'rsrc/js/application/conpherence/behavior-durable-column.js' => '2ae077e1', - 'rsrc/js/application/conpherence/behavior-menu.js' => 'c9b99b77', - 'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8', + 'rsrc/js/application/conpherence/behavior-menu.js' => '4047cd35', + 'rsrc/js/application/conpherence/behavior-participant-pane.js' => 'd057e45a', 'rsrc/js/application/conpherence/behavior-pontificate.js' => '55616e04', 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', 'rsrc/js/application/conpherence/behavior-toggle-widget.js' => '3dbf94d5', @@ -403,7 +403,7 @@ return array( 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', 'rsrc/js/application/differential/behavior-populate.js' => '419998ab', 'rsrc/js/application/differential/behavior-user-select.js' => 'a8d8459d', - 'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'c93358e3', + 'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => '00676f00', 'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'd835b03a', 'rsrc/js/application/diffusion/behavior-commit-branches.js' => 'bdaf4d04', 'rsrc/js/application/diffusion/behavior-commit-graph.js' => '75b83cbb', @@ -428,7 +428,7 @@ return array( 'rsrc/js/application/owners/owners-path-editor.js' => '7a68dda3', 'rsrc/js/application/passphrase/passphrase-credential-control.js' => '3cb0b2fc', 'rsrc/js/application/pholio/behavior-pholio-mock-edit.js' => 'bee502c8', - 'rsrc/js/application/pholio/behavior-pholio-mock-view.js' => 'fbe497e7', + 'rsrc/js/application/pholio/behavior-pholio-mock-view.js' => 'ec1f3669', 'rsrc/js/application/phortune/behavior-stripe-payment-form.js' => 'a6b98425', 'rsrc/js/application/phortune/behavior-test-payment-form.js' => 'fc91ab6c', 'rsrc/js/application/phortune/phortune-credit-card-form.js' => '2290aeef', @@ -468,7 +468,7 @@ return array( 'rsrc/js/core/KeyboardShortcutManager.js' => 'c19dd9b9', 'rsrc/js/core/MultirowRowManager.js' => 'b5d57730', 'rsrc/js/core/Notification.js' => '008faf9c', - 'rsrc/js/core/Prefab.js' => 'c5af80a2', + 'rsrc/js/core/Prefab.js' => '77b0ae28', 'rsrc/js/core/ShapedRequest.js' => '7cbe244b', 'rsrc/js/core/TextAreaUtils.js' => '320810c8', 'rsrc/js/core/Title.js' => '485aaa6c', @@ -480,7 +480,7 @@ return array( 'rsrc/js/core/behavior-choose-control.js' => '327a00d1', 'rsrc/js/core/behavior-copy.js' => 'b0b8f86d', 'rsrc/js/core/behavior-detect-timezone.js' => '4c193c96', - 'rsrc/js/core/behavior-device.js' => 'bb1dd507', + 'rsrc/js/core/behavior-device.js' => 'a3714c76', 'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '484a6e22', 'rsrc/js/core/behavior-error-log.js' => '6882e80a', 'rsrc/js/core/behavior-fancy-datepicker.js' => 'ecf4e799', @@ -527,9 +527,9 @@ return array( 'rsrc/js/phui/behavior-phui-tab-group.js' => '0a0b10e9', 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 'rsrc/js/phuix/PHUIXActionView.js' => '442efd08', - 'rsrc/js/phuix/PHUIXAutocomplete.js' => '4b7430ab', + 'rsrc/js/phuix/PHUIXAutocomplete.js' => 'e0731603', 'rsrc/js/phuix/PHUIXButtonView.js' => '8a91e1ac', - 'rsrc/js/phuix/PHUIXDropdownMenu.js' => '8018ee50', + 'rsrc/js/phuix/PHUIXDropdownMenu.js' => '04b2ae03', 'rsrc/js/phuix/PHUIXExample.js' => '68af71ca', 'rsrc/js/phuix/PHUIXFormControl.js' => '83e03671', 'rsrc/js/phuix/PHUIXIconView.js' => 'bff6884b', @@ -599,8 +599,8 @@ return array( 'javelin-behavior-choose-control' => '327a00d1', 'javelin-behavior-comment-actions' => '9a6dd75c', 'javelin-behavior-config-reorder-fields' => 'b6993408', - 'javelin-behavior-conpherence-menu' => 'c9b99b77', - 'javelin-behavior-conpherence-participant-pane' => '8604caa8', + 'javelin-behavior-conpherence-menu' => '4047cd35', + 'javelin-behavior-conpherence-participant-pane' => 'd057e45a', 'javelin-behavior-conpherence-pontificate' => '55616e04', 'javelin-behavior-conpherence-search' => '9bbf3762', 'javelin-behavior-countdown-timer' => 'e4cc26b3', @@ -612,7 +612,7 @@ return array( 'javelin-behavior-day-view' => '4b3c4443', 'javelin-behavior-desktop-notifications-control' => '27ca6289', 'javelin-behavior-detect-timezone' => '4c193c96', - 'javelin-behavior-device' => 'bb1dd507', + 'javelin-behavior-device' => 'a3714c76', 'javelin-behavior-diff-preview-link' => '051c7832', 'javelin-behavior-differential-diff-radios' => 'e1ff79b1', 'javelin-behavior-differential-feedback-preview' => '51c5ad07', @@ -669,7 +669,7 @@ return array( 'javelin-behavior-phabricator-transaction-list' => '1f6794f6', 'javelin-behavior-phabricator-watch-anchor' => '9f36c42d', 'javelin-behavior-pholio-mock-edit' => 'bee502c8', - 'javelin-behavior-pholio-mock-view' => 'fbe497e7', + 'javelin-behavior-pholio-mock-view' => 'ec1f3669', 'javelin-behavior-phui-dropdown-menu' => 'b95d6f7d', 'javelin-behavior-phui-file-upload' => 'b003d4fb', 'javelin-behavior-phui-hovercards' => 'bcaccd64', @@ -709,7 +709,7 @@ return array( 'javelin-behavior-workflow' => '0a3f3021', 'javelin-color' => '7e41274a', 'javelin-cookie' => '62dfea03', - 'javelin-diffusion-locate-file-source' => 'c93358e3', + 'javelin-diffusion-locate-file-source' => '00676f00', 'javelin-dom' => '4976858c', 'javelin-dynval' => 'f6555212', 'javelin-event' => '2ee659ce', @@ -794,7 +794,7 @@ return array( 'phabricator-notification-menu-css' => '10685bd4', 'phabricator-object-selector-css' => '85ee8ce6', 'phabricator-phtize' => 'd254d646', - 'phabricator-prefab' => 'c5af80a2', + 'phabricator-prefab' => '77b0ae28', 'phabricator-remarkup-css' => 'cad18339', 'phabricator-search-results-css' => '505dd8cf', 'phabricator-shaped-request' => '7cbe244b', @@ -835,7 +835,7 @@ return array( 'phui-crumbs-view-css' => '6ece3bbb', 'phui-curtain-view-css' => '2bdaf026', 'phui-document-summary-view-css' => '9ca48bdf', - 'phui-document-view-css' => 'c32e8dec', + 'phui-document-view-css' => '878c2f52', 'phui-document-view-pro-css' => '8af7ea27', 'phui-feed-story-css' => '44a9c8e9', 'phui-font-icon-base-css' => '870a7360', @@ -843,7 +843,7 @@ return array( 'phui-form-css' => '7aaa04e3', 'phui-form-view-css' => 'ae9f8d16', 'phui-head-thing-view-css' => 'fd311e5f', - 'phui-header-view-css' => '67fab16d', + 'phui-header-view-css' => '31dc6c72', 'phui-hovercard' => '1bd28176', 'phui-hovercard-view-css' => 'f0592bcf', 'phui-icon-set-selector-css' => '87db8fee', @@ -879,9 +879,9 @@ return array( 'phui-workpanel-view-css' => 'a3a63478', 'phuix-action-list-view' => 'b5c256b8', 'phuix-action-view' => '442efd08', - 'phuix-autocomplete' => '4b7430ab', + 'phuix-autocomplete' => 'e0731603', 'phuix-button-view' => '8a91e1ac', - 'phuix-dropdown-menu' => '8018ee50', + 'phuix-dropdown-menu' => '04b2ae03', 'phuix-form-control-view' => '83e03671', 'phuix-icon-view' => 'bff6884b', 'policy-css' => '957ea14c', @@ -904,6 +904,12 @@ return array( 'unhandled-exception-css' => '4c96257a', ), 'requires' => array( + '00676f00' => array( + 'javelin-install', + 'javelin-dom', + 'javelin-typeahead-preloaded-source', + 'javelin-util', + ), '008faf9c' => array( 'javelin-install', 'javelin-dom', @@ -924,6 +930,13 @@ return array( 'javelin-dom', 'phabricator-keyboard-shortcut', ), + '04b2ae03' => array( + 'javelin-install', + 'javelin-util', + 'javelin-dom', + 'javelin-vector', + 'javelin-stratcom', + ), '051c7832' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1142,6 +1155,20 @@ return array( '3ffe32d6' => array( 'javelin-install', ), + '4047cd35' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-util', + 'javelin-stratcom', + 'javelin-workflow', + 'javelin-behavior-device', + 'javelin-history', + 'javelin-vector', + 'javelin-scrollbar', + 'phabricator-title', + 'phabricator-shaped-request', + 'conpherence-thread-manager', + ), '408bf173' => array( 'javelin-behavior', 'javelin-dom', @@ -1232,12 +1259,6 @@ return array( 'javelin-util', 'phabricator-shaped-request', ), - '4b7430ab' => array( - 'javelin-install', - 'javelin-dom', - 'phuix-icon-view', - 'phabricator-prefab', - ), '4c193c96' => array( 'javelin-behavior', 'javelin-uri', @@ -1471,6 +1492,18 @@ return array( 'javelin-reactor', 'javelin-util', ), + '77b0ae28' => array( + 'javelin-install', + 'javelin-util', + 'javelin-dom', + 'javelin-typeahead', + 'javelin-tokenizer', + 'javelin-typeahead-preloaded-source', + 'javelin-typeahead-ondemand-source', + 'javelin-dom', + 'javelin-stratcom', + 'javelin-util', + ), '77c1f0b0' => array( 'javelin-behavior', 'javelin-dom', @@ -1513,13 +1546,6 @@ return array( '7f243deb' => array( 'javelin-install', ), - '8018ee50' => array( - 'javelin-install', - 'javelin-util', - 'javelin-dom', - 'javelin-vector', - 'javelin-stratcom', - ), '834a1173' => array( 'javelin-behavior', 'javelin-scrollbar', @@ -1536,15 +1562,6 @@ return array( '85ee8ce6' => array( 'aphront-dialog-view-css', ), - '8604caa8' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-workflow', - 'javelin-util', - 'phabricator-notification', - 'conpherence-thread-manager', - ), '88236f00' => array( 'javelin-behavior', 'phabricator-keyboard-shortcut', @@ -1698,6 +1715,13 @@ return array( 'javelin-util', 'phabricator-keyboard-shortcut', ), + 'a3714c76' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-dom', + 'javelin-vector', + 'javelin-install', + ), 'a3a63478' => array( 'phui-workcard-view-css', ), @@ -1835,13 +1859,6 @@ return array( 'javelin-uri', 'phabricator-notification', ), - 'bb1dd507' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-dom', - 'javelin-vector', - 'javelin-install', - ), 'bcaccd64' => array( 'javelin-behavior', 'javelin-behavior-device', @@ -1901,18 +1918,6 @@ return array( 'c587b80f' => array( 'javelin-install', ), - 'c5af80a2' => array( - 'javelin-install', - 'javelin-util', - 'javelin-dom', - 'javelin-typeahead', - 'javelin-tokenizer', - 'javelin-typeahead-preloaded-source', - 'javelin-typeahead-ondemand-source', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-util', - ), 'c7ccd872' => array( 'phui-fontkit-css', ), @@ -1924,31 +1929,11 @@ return array( 'javelin-install', 'javelin-util', ), - 'c93358e3' => array( - 'javelin-install', - 'javelin-dom', - 'javelin-typeahead-preloaded-source', - 'javelin-util', - ), 'c989ade3' => array( 'javelin-install', 'javelin-util', 'javelin-stratcom', ), - 'c9b99b77' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-util', - 'javelin-stratcom', - 'javelin-workflow', - 'javelin-behavior-device', - 'javelin-history', - 'javelin-vector', - 'javelin-scrollbar', - 'phabricator-title', - 'phabricator-shaped-request', - 'conpherence-thread-manager', - ), 'caade6f2' => array( 'javelin-behavior', 'javelin-request', @@ -1966,6 +1951,15 @@ return array( 'cd2b9b77' => array( 'phui-oi-list-view-css', ), + 'd057e45a' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-stratcom', + 'javelin-workflow', + 'javelin-util', + 'phabricator-notification', + 'conpherence-thread-manager', + ), 'd0a99ab4' => array( 'javelin-behavior', 'javelin-typeahead-ondemand-source', @@ -2030,6 +2024,12 @@ return array( 'javelin-typeahead-ondemand-source', 'javelin-dom', ), + 'e0731603' => array( + 'javelin-install', + 'javelin-dom', + 'phuix-icon-view', + 'phabricator-prefab', + ), 'e1d25dfb' => array( 'javelin-behavior', 'javelin-stratcom', @@ -2096,6 +2096,20 @@ return array( 'javelin-dom', 'phabricator-draggable-list', ), + 'ec1f3669' => array( + 'javelin-behavior', + 'javelin-util', + 'javelin-stratcom', + 'javelin-dom', + 'javelin-vector', + 'javelin-magical-init', + 'javelin-request', + 'javelin-history', + 'javelin-workflow', + 'javelin-mask', + 'javelin-behavior-device', + 'phabricator-keyboard-shortcut', + ), 'ecf4e799' => array( 'javelin-behavior', 'javelin-util', @@ -2144,20 +2158,6 @@ return array( 'javelin-install', 'javelin-dom', ), - 'fbe497e7' => array( - 'javelin-behavior', - 'javelin-util', - 'javelin-stratcom', - 'javelin-dom', - 'javelin-vector', - 'javelin-magical-init', - 'javelin-request', - 'javelin-history', - 'javelin-workflow', - 'javelin-mask', - 'javelin-behavior-device', - 'phabricator-keyboard-shortcut', - ), 'fc91ab6c' => array( 'javelin-behavior', 'javelin-dom', From cf3e198b9f69c10714d1fd58a4b591ac1723b72d Mon Sep 17 00:00:00 2001 From: Dmitri Iouchtchenko Date: Mon, 9 Oct 2017 11:56:05 -0700 Subject: [PATCH 05/11] Change 'tempate' to 'template' Summary: Fixed typo. See D18693. Test Plan: None. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D18694 --- .../fund/application/PhabricatorFundApplication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/fund/application/PhabricatorFundApplication.php b/src/applications/fund/application/PhabricatorFundApplication.php index 9f29f30986..58ce4f8922 100644 --- a/src/applications/fund/application/PhabricatorFundApplication.php +++ b/src/applications/fund/application/PhabricatorFundApplication.php @@ -56,7 +56,7 @@ final class PhabricatorFundApplication extends PhabricatorApplication { return array( FundDefaultViewCapability::CAPABILITY => array( 'caption' => pht('Default view policy for newly created initiatives.'), - 'tempate' => FundInitiativePHIDType::TYPECONST, + 'template' => FundInitiativePHIDType::TYPECONST, ), FundCreateInitiativesCapability::CAPABILITY => array( 'default' => PhabricatorPolicies::POLICY_ADMIN, From 5897294fa97e17002fd8d847abd97a81cc420971 Mon Sep 17 00:00:00 2001 From: Dmitri Iouchtchenko Date: Mon, 9 Oct 2017 11:56:52 -0700 Subject: [PATCH 06/11] Add spelling TODOs Summary: Ref T13005. Added reminders not to copy/paste. Test Plan: None. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13005 Differential Revision: https://secure.phabricator.com/D18695 --- src/applications/auth/provider/PhabricatorLDAPAuthProvider.php | 1 + .../capability/HarbormasterBuildPlanDefaultViewCapability.php | 1 + .../legalpad/xaction/LegalpadDocumentPreambleTransaction.php | 1 + 3 files changed, 3 insertions(+) diff --git a/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php b/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php index 7c2bf38618..44b58b85ff 100644 --- a/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php +++ b/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php @@ -192,6 +192,7 @@ final class PhabricatorLDAPAuthProvider extends PhabricatorAuthProvider { const KEY_VERSION = 'ldap:version'; const KEY_REFERRALS = 'ldap:referrals'; const KEY_START_TLS = 'ldap:start-tls'; + // TODO: This is misspelled! See T13005. const KEY_ANONYMOUS_USERNAME = 'ldap:anoynmous-username'; const KEY_ANONYMOUS_PASSWORD = 'ldap:anonymous-password'; const KEY_ALWAYS_SEARCH = 'ldap:always-search'; diff --git a/src/applications/harbormaster/capability/HarbormasterBuildPlanDefaultViewCapability.php b/src/applications/harbormaster/capability/HarbormasterBuildPlanDefaultViewCapability.php index 5d3d46caa0..d9ebbb2f0d 100644 --- a/src/applications/harbormaster/capability/HarbormasterBuildPlanDefaultViewCapability.php +++ b/src/applications/harbormaster/capability/HarbormasterBuildPlanDefaultViewCapability.php @@ -3,6 +3,7 @@ final class HarbormasterBuildPlanDefaultViewCapability extends PhabricatorPolicyCapability { + // TODO: This is misspelled! See T13005. const CAPABILITY = 'harbomaster.plan.default.view'; public function getCapabilityName() { diff --git a/src/applications/legalpad/xaction/LegalpadDocumentPreambleTransaction.php b/src/applications/legalpad/xaction/LegalpadDocumentPreambleTransaction.php index a2b5e1f5cd..7ccb03c95b 100644 --- a/src/applications/legalpad/xaction/LegalpadDocumentPreambleTransaction.php +++ b/src/applications/legalpad/xaction/LegalpadDocumentPreambleTransaction.php @@ -3,6 +3,7 @@ final class LegalpadDocumentPreambleTransaction extends LegalpadDocumentTransactionType { + // TODO: This is misspelled! See T13005. const TRANSACTIONTYPE = 'legalpad:premable'; public function generateOldValue($object) { From 821c7ac8334f54bcb3f290ae91f44421ce232716 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 9 Oct 2017 17:01:56 -0700 Subject: [PATCH 07/11] For backup persitsence, mark the "common ngrams" table as a data table, not an index table Summary: Ref T13000. Garbage collecting common ngrams is slow because MySQL isn't all that great at deleting rows quickly. See PHI96, where it looks like it's going to take a week to GC ngrams for a ~million objects at a relatively conservative 0.15 threshold. In the event of a restore, we can reduce the impact by persisting this table so the ngrams just don't get built when the reindex happens. Test Plan: Viewed schema in Config, saw common ngrams tables marked as "Data" instead of "Index". Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13000 Differential Revision: https://secure.phabricator.com/D18696 --- .../config/schema/PhabricatorConfigSchemaSpec.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/applications/config/schema/PhabricatorConfigSchemaSpec.php b/src/applications/config/schema/PhabricatorConfigSchemaSpec.php index c451658682..8e67391b59 100644 --- a/src/applications/config/schema/PhabricatorConfigSchemaSpec.php +++ b/src/applications/config/schema/PhabricatorConfigSchemaSpec.php @@ -81,12 +81,15 @@ abstract class PhabricatorConfigSchemaSpec extends Phobject { $engine->getNgramsSchemaKeys(), $index_options); + // NOTE: The common ngrams table is not marked as an index table. It is + // tiny and persisting it across a restore saves us a lot of work garbage + // collecting common ngrams from the index after it gets built. + $this->buildRawSchema( $engine->getApplicationName(), $engine->getCommonNgramsTableName(), $engine->getCommonNgramsSchemaColumns(), - $engine->getCommonNgramsSchemaKeys(), - $index_options); + $engine->getCommonNgramsSchemaKeys()); } protected function buildRawSchema( From 9777c66576ffef33030663c4badc29af74e152d7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 10 Oct 2017 15:13:56 -0700 Subject: [PATCH 08/11] Allow Phabricator to run with "enable_post_data_reading" disabled Summary: Ref T13008. Depends on D18701. The overall goal here is to make turning `enable_post_data_reading` off not break things, so we can run rate limiting checks before we read file uploads. The biggest blocker for this is that turning it off stops `$_FILES` from coming into existence. This //appears// to mostly work. Specifically: - Skip the `max_post_size` check when POST is off, since it's meaningless. - Don't read or scrub $_POST at startup when POST is off. - When we rebuild REQUEST and POST before processing requests, do multipart parsing if we need to and rebuild FILES. - Skip the `is_uploaded_file()` check if we built FILES ourselves. This probably breaks a couple of small things, like maybe `__profile__` and other DarkConsole triggers over POST, and probably some other weird stuff. The parsers may also need more work than they've received so far. I also need to verify that this actually works (i.e., lets us run code without reading the request body) but I'll include that in the change where I update the actual rate limiting. Test Plan: - Disabled `enable_post_data_reading`. - Uploaded a file with a vanilla upload form (project profile image). - Uploaded a file with drag and drop. - Used DarkConsole. - Submitted comments. - Created a task. - Browsed around. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13008 Differential Revision: https://secure.phabricator.com/D18702 --- ...AphrontDefaultApplicationConfiguration.php | 77 ++++++++++++++++--- .../files/storage/PhabricatorFile.php | 14 +++- support/PhabricatorStartup.php | 34 +++++--- 3 files changed, 101 insertions(+), 24 deletions(-) diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php index be23895bec..fb67919576 100644 --- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php @@ -15,26 +15,79 @@ class AphrontDefaultApplicationConfiguration $parser = new PhutilQueryStringParser(); $data = array(); - // If the request has "multipart/form-data" content, we can't use - // PhutilQueryStringParser to parse it, and the raw data supposedly is not - // available anyway (according to the PHP documentation, "php://input" is - // not available for "multipart/form-data" requests). However, it is - // available at least some of the time (see T3673), so double check that - // we aren't trying to parse data we won't be able to parse correctly by - // examining the Content-Type header. - $content_type = idx($_SERVER, 'CONTENT_TYPE'); - $is_form_data = preg_match('@^multipart/form-data@i', $content_type); - $request_method = idx($_SERVER, 'REQUEST_METHOD'); if ($request_method === 'PUT') { // For PUT requests, do nothing: in particular, do NOT read input. This // allows us to stream input later and process very large PUT requests, // like those coming from Git LFS. } else { + // For POST requests, we're going to read the raw input ourselves here + // if we can. Among other things, this corrects variable names with + // the "." character in them, which PHP normally converts into "_". + + // There are two major considerations here: whether the + // `enable_post_data_reading` option is set, and whether the content + // type is "multipart/form-data" or not. + + // If `enable_post_data_reading` is off, we're free to read the entire + // raw request body and parse it -- and we must, because $_POST and + // $_FILES are not built for us. If `enable_post_data_reading` is on, + // which is the default, we may not be able to read the body (the + // documentation says we can't, but empirically we can at least some + // of the time). + + // If the content type is "multipart/form-data", we need to build both + // $_POST and $_FILES, which is involved. The body itself is also more + // difficult to parse than other requests. $raw_input = PhabricatorStartup::getRawInput(); - if (strlen($raw_input) && !$is_form_data) { - $data += $parser->parseQueryString($raw_input); + if (strlen($raw_input)) { + $content_type = idx($_SERVER, 'CONTENT_TYPE'); + $is_multipart = preg_match('@^multipart/form-data@i', $content_type); + if ($is_multipart && !ini_get('enable_post_data_reading')) { + $multipart_parser = id(new AphrontMultipartParser()) + ->setContentType($content_type); + + $multipart_parser->beginParse(); + $multipart_parser->continueParse($raw_input); + $parts = $multipart_parser->endParse(); + + $query_string = array(); + foreach ($parts as $part) { + if (!$part->isVariable()) { + continue; + } + + $name = $part->getName(); + $value = $part->getVariableValue(); + + $query_string[] = urlencode($name).'='.urlencode($value); + } + $query_string = implode('&', $query_string); + $post = $parser->parseQueryString($query_string); + + $files = array(); + foreach ($parts as $part) { + if ($part->isVariable()) { + continue; + } + + $files[$part->getName()] = $part->getPHPFileDictionary(); + } + $_FILES = $files; + } else { + $post = $parser->parseQueryString($raw_input); + } + + $_POST = $post; + PhabricatorStartup::rebuildRequest(); + + $data += $post; } else if ($_POST) { + $post = filter_input_array(INPUT_POST, FILTER_UNSAFE_RAW); + if (is_array($post)) { + $_POST = $post; + PhabricatorStartup::rebuildRequest(); + } $data += $_POST; } } diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php index 19f0bed90a..9636b5b017 100644 --- a/src/applications/files/storage/PhabricatorFile.php +++ b/src/applications/files/storage/PhabricatorFile.php @@ -178,9 +178,17 @@ final class PhabricatorFile extends PhabricatorFileDAO } $tmp_name = idx($spec, 'tmp_name'); - $is_valid = @is_uploaded_file($tmp_name); - if (!$is_valid) { - throw new Exception(pht('File is not an uploaded file.')); + + // NOTE: If we parsed the request body ourselves, the files we wrote will + // not be registered in the `is_uploaded_file()` list. It's fine to skip + // this check: it just protects against sloppy code from the long ago era + // of "register_globals". + + if (ini_get('enable_post_data_reading')) { + $is_valid = @is_uploaded_file($tmp_name); + if (!$is_valid) { + throw new Exception(pht('File is not an uploaded file.')); + } } $file_data = Filesystem::readFile($tmp_name); diff --git a/support/PhabricatorStartup.php b/support/PhabricatorStartup.php index fd286b2aa0..3d771a24f7 100644 --- a/support/PhabricatorStartup.php +++ b/support/PhabricatorStartup.php @@ -416,9 +416,12 @@ final class PhabricatorStartup { // NOTE: We don't filter INPUT_SERVER because we don't want to overwrite // changes made in "preamble.php". + + // NOTE: WE don't filter INPUT_POST because we may be constructing it + // lazily if "enable_post_data_reading" is disabled. + $filter = array( INPUT_GET, - INPUT_POST, INPUT_ENV, INPUT_COOKIE, ); @@ -434,9 +437,6 @@ final class PhabricatorStartup { case INPUT_COOKIE: $_COOKIE = array_merge($_COOKIE, $filtered); break; - case INPUT_POST: - $_POST = array_merge($_POST, $filtered); - break; case INPUT_ENV; $env = array_merge($_ENV, $filtered); $_ENV = self::filterEnvSuperglobal($env); @@ -444,18 +444,28 @@ final class PhabricatorStartup { } } - // rebuild $_REQUEST, respecting order declared in ini files + self::rebuildRequest(); + } + + /** + * @task validation + */ + public static function rebuildRequest() { + // Rebuild $_REQUEST, respecting order declared in ".ini" files. $order = ini_get('request_order'); + if (!$order) { $order = ini_get('variables_order'); } + if (!$order) { - // $_REQUEST will be empty, leave it alone + // $_REQUEST will be empty, so leave it alone. return; } + $_REQUEST = array(); - for ($i = 0; $i < strlen($order); $i++) { - switch ($order[$i]) { + for ($ii = 0; $ii < strlen($order); $ii++) { + switch ($order[$ii]) { case 'G': $_REQUEST = array_merge($_REQUEST, $_GET); break; @@ -466,7 +476,7 @@ final class PhabricatorStartup { $_REQUEST = array_merge($_REQUEST, $_COOKIE); break; default: - // $_ENV and $_SERVER never go into $_REQUEST + // $_ENV and $_SERVER never go into $_REQUEST. break; } } @@ -593,6 +603,12 @@ final class PhabricatorStartup { return; } + // If "enable_post_data_reading" is off, we won't have $_POST and this + // condition is effectively impossible. + if (!ini_get('enable_post_data_reading')) { + return; + } + // If there's POST data, clearly we're in good shape. if ($_POST) { return; From 3f53718d107f0fc96ca9a189e669c5a7f3d64cc4 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 11 Oct 2017 14:23:09 -0700 Subject: [PATCH 09/11] Modularize rate/connection limits in Phabricator Summary: Depends on D18702. Ref T13008. This replaces the old hard-coded single rate limit with multiple flexible limits, and defines two types of limits: - Rate: reject requests if a client has completed too many requests recently. - Connection: reject requests if a client has too many more connections than disconnections recently. The connection limit adds +1 to the score for each connection, then adds -1 for each disconnection. So the overall number is how many open connections they have, at least approximately. Supporting multiple limits will let us do limiting by Hostname and by remote address (e.g., a specific IP can't exceed a low limit, and all requests to a hostname can't exceed a higher limit). Configuring the new limits looks something like this: ``` PhabricatorStartup::addRateLimit(new PhabricatorClientRateLimit()) ->setLimitKey('rate') ->setClientKey($_SERVER['REMOTE_ADDR']) ->setLimit(5); PhabricatorStartup::addRateLimit(new PhabricatorClientConnectionLimit()) ->setLimitKey('conn') ->setClientKey($_SERVER['REMOTE_ADDR']) ->setLimit(2); ``` Test Plan: - Configured limits as above. - Made a lot of requests, got cut off by the rate limit. - Used `curl --limit-rate -F 'data=@the_letter_m.txt' ...` to upload files really slowly. Got cut off by the connection limit. With `enable_post_data_reading` off, this correctly killed the connections //before// the uploads finished. - I'll send this stuff to `secure` before production to give it more of a chance. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13008 Differential Revision: https://secure.phabricator.com/D18703 --- .../AphrontApplicationConfiguration.php | 18 +- .../PhabricatorAccessControlTestCase.php | 2 +- .../PhabricatorClientConnectionLimit.php | 44 +++ support/startup/PhabricatorClientLimit.php | 291 +++++++++++++++++ .../startup/PhabricatorClientRateLimit.php | 58 ++++ support/{ => startup}/PhabricatorStartup.php | 299 +++--------------- webroot/index.php | 7 +- 7 files changed, 446 insertions(+), 273 deletions(-) create mode 100644 support/startup/PhabricatorClientConnectionLimit.php create mode 100644 support/startup/PhabricatorClientLimit.php create mode 100644 support/startup/PhabricatorClientRateLimit.php rename support/{ => startup}/PhabricatorStartup.php (73%) diff --git a/src/aphront/configuration/AphrontApplicationConfiguration.php b/src/aphront/configuration/AphrontApplicationConfiguration.php index c0cd259992..60b12557c9 100644 --- a/src/aphront/configuration/AphrontApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontApplicationConfiguration.php @@ -204,20 +204,10 @@ abstract class AphrontApplicationConfiguration extends Phobject { DarkConsoleXHProfPluginAPI::saveProfilerSample($access_log); - // Add points to the rate limits for this request. - $rate_token = PhabricatorStartup::getRateLimitToken(); - if ($rate_token !== null) { - // The base score for a request allows users to make 30 requests per - // minute. - $score = (1000 / 30); - - // If the user was logged in, let them make more requests. - if ($request->getUser() && $request->getUser()->getPHID()) { - $score = $score / 5; - } - - PhabricatorStartup::addRateLimitScore($rate_token, $score); - } + PhabricatorStartup::disconnectRateLimits( + array( + 'viewer' => $request->getUser(), + )); if ($processing_exception) { throw $processing_exception; diff --git a/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php b/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php index 27e716556e..b6c268d88c 100644 --- a/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php +++ b/src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php @@ -10,7 +10,7 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase { public function testControllerAccessControls() { $root = dirname(phutil_get_library_root('phabricator')); - require_once $root.'/support/PhabricatorStartup.php'; + require_once $root.'/support/startup/PhabricatorStartup.php'; $application_configuration = new AphrontDefaultApplicationConfiguration(); diff --git a/support/startup/PhabricatorClientConnectionLimit.php b/support/startup/PhabricatorClientConnectionLimit.php new file mode 100644 index 0000000000..4a66d05739 --- /dev/null +++ b/support/startup/PhabricatorClientConnectionLimit.php @@ -0,0 +1,44 @@ + $this->getLimit()); + } + + protected function getConnectScore() { + return 1; + } + + protected function getPenaltyScore() { + return 0; + } + + protected function getDisconnectScore(array $request_state) { + return -1; + } + + protected function getRateLimitReason($score) { + $client_key = $this->getClientKey(); + + // NOTE: This happens before we load libraries, so we can not use pht() + // here. + + return + "TOO MANY CONCURRENT CONNECTIONS\n". + "You (\"{$client_key}\") have too many concurrent ". + "connections.\n"; + } + +} diff --git a/support/startup/PhabricatorClientLimit.php b/support/startup/PhabricatorClientLimit.php new file mode 100644 index 0000000000..bab90c6f15 --- /dev/null +++ b/support/startup/PhabricatorClientLimit.php @@ -0,0 +1,291 @@ +limitKey = $limit_key; + return $this; + } + + final public function getLimitKey() { + return $this->limitKey; + } + + final public function setClientKey($client_key) { + $this->clientKey = $client_key; + return $this; + } + + final public function getClientKey() { + return $this->clientKey; + } + + final public function setLimit($limit) { + $this->limit = $limit; + return $this; + } + + final public function getLimit() { + return $this->limit; + } + + final public function didConnect() { + // NOTE: We can not use pht() here because this runs before libraries + // load. + + if (!function_exists('apc_fetch') && !function_exists('apcu_fetch')) { + throw new Exception( + 'You can not configure connection rate limits unless APC/APCu are '. + 'available. Rate limits rely on APC/APCu to track clients and '. + 'connections.'); + } + + if ($this->getClientKey() === null) { + throw new Exception( + 'You must configure a client key when defining a rate limit.'); + } + + if ($this->getLimitKey() === null) { + throw new Exception( + 'You must configure a limit key when defining a rate limit.'); + } + + if ($this->getLimit() === null) { + throw new Exception( + 'You must configure a limit when defining a rate limit.'); + } + + $points = $this->getConnectScore(); + if ($points) { + $this->addScore($points); + } + + $score = $this->getScore(); + if (!$this->shouldRejectConnection($score)) { + // Client has not hit the limit, so continue processing the request. + return null; + } + + $penalty = $this->getPenaltyScore(); + if ($penalty) { + $this->addScore($penalty); + $score += $penalty; + } + + return $this->getRateLimitReason($score); + } + + final public function didDisconnect(array $request_state) { + $score = $this->getDisconnectScore($request_state); + if ($score) { + $this->addScore($score); + } + } + + + /** + * Get the number of seconds for each rate bucket. + * + * For example, a value of 60 will create one-minute buckets. + * + * @return int Number of seconds per bucket. + */ + abstract protected function getBucketDuration(); + + + /** + * Get the total number of rate limit buckets to retain. + * + * @return int Total number of rate limit buckets to retain. + */ + abstract protected function getBucketCount(); + + + /** + * Get the score to add when a client connects. + * + * @return double Connection score. + */ + abstract protected function getConnectScore(); + + + /** + * Get the number of penalty points to add when a client hits a rate limit. + * + * @return double Penalty score. + */ + abstract protected function getPenaltyScore(); + + + /** + * Get the score to add when a client disconnects. + * + * @return double Connection score. + */ + abstract protected function getDisconnectScore(array $request_state); + + + /** + * Get a human-readable explanation of why the client is being rejected. + * + * @return string Brief rejection message. + */ + abstract protected function getRateLimitReason($score); + + + /** + * Determine whether to reject a connection. + * + * @return bool True to reject the connection. + */ + abstract protected function shouldRejectConnection($score); + + + /** + * Get the APC key for the smallest stored bucket. + * + * @return string APC key for the smallest stored bucket. + * @task ratelimit + */ + private function getMinimumBucketCacheKey() { + $limit_key = $this->getLimitKey(); + return "limit:min:{$limit_key}"; + } + + + /** + * Get the current bucket ID for storing rate limit scores. + * + * @return int The current bucket ID. + */ + private function getCurrentBucketID() { + return (int)(time() / $this->getBucketDuration()); + } + + + /** + * Get the APC key for a given bucket. + * + * @param int Bucket to get the key for. + * @return string APC key for the bucket. + */ + private function getBucketCacheKey($bucket_id) { + $limit_key = $this->getLimitKey(); + return "limit:bucket:{$limit_key}:{$bucket_id}"; + } + + + /** + * Add points to the rate limit score for some client. + * + * @param string Some key which identifies the client making the request. + * @param float The cost for this request; more points pushes them toward + * the limit faster. + * @return this + */ + private function addScore($score) { + $is_apcu = (bool)function_exists('apcu_fetch'); + + $current = $this->getCurrentBucketID(); + $bucket_key = $this->getBucketCacheKey($current); + + // There's a bit of a race here, if a second process reads the bucket + // before this one writes it, but it's fine if we occasionally fail to + // record a client's score. If they're making requests fast enough to hit + // rate limiting, we'll get them soon enough. + + if ($is_apcu) { + $bucket = apcu_fetch($bucket_key); + } else { + $bucket = apc_fetch($bucket_key); + } + + if (!is_array($bucket)) { + $bucket = array(); + } + + $client_key = $this->getClientKey(); + if (empty($bucket[$client_key])) { + $bucket[$client_key] = 0; + } + + $bucket[$client_key] += $score; + + if ($is_apcu) { + apcu_store($bucket_key, $bucket); + } else { + apc_store($bucket_key, $bucket); + } + + return $this; + } + + + /** + * Get the current rate limit score for a given client. + * + * @return float The client's current score. + * @task ratelimit + */ + private function getScore() { + $is_apcu = (bool)function_exists('apcu_fetch'); + + // Identify the oldest bucket stored in APC. + $min_key = $this->getMinimumBucketCacheKey(); + if ($is_apcu) { + $min = apcu_fetch($min_key); + } else { + $min = apc_fetch($min_key); + } + + // If we don't have any buckets stored yet, store the current bucket as + // the oldest bucket. + $cur = $this->getCurrentBucketID(); + if (!$min) { + if ($is_apcu) { + apcu_store($min_key, $cur); + } else { + apc_store($min_key, $cur); + } + $min = $cur; + } + + // Destroy any buckets that are older than the minimum bucket we're keeping + // track of. Under load this normally shouldn't do anything, but will clean + // up an old bucket once per minute. + $count = $this->getBucketCount(); + for ($cursor = $min; $cursor < ($cur - $count); $cursor++) { + $bucket_key = $this->getBucketCacheKey($cursor); + if ($is_apcu) { + apcu_delete($bucket_key); + apcu_store($min_key, $cursor + 1); + } else { + apc_delete($bucket_key); + apc_store($min_key, $cursor + 1); + } + } + + $client_key = $this->getClientKey(); + + // Now, sum up the client's scores in all of the active buckets. + $score = 0; + for (; $cursor <= $cur; $cursor++) { + $bucket_key = $this->getBucketCacheKey($cursor); + if ($is_apcu) { + $bucket = apcu_fetch($bucket_key); + } else { + $bucket = apc_fetch($bucket_key); + } + if (isset($bucket[$client_key])) { + $score += $bucket[$client_key]; + } + } + + return $score; + } + +} diff --git a/support/startup/PhabricatorClientRateLimit.php b/support/startup/PhabricatorClientRateLimit.php new file mode 100644 index 0000000000..85a6def878 --- /dev/null +++ b/support/startup/PhabricatorClientRateLimit.php @@ -0,0 +1,58 @@ +getLimit(); + + // Reject connections if the average score across all buckets exceeds the + // limit. + $average_score = $score / $this->getBucketCount(); + + return ($average_score > $limit); + } + + protected function getConnectScore() { + return 0; + } + + protected function getPenaltyScore() { + return 1; + } + + protected function getDisconnectScore(array $request_state) { + $score = 1; + + // If the user was logged in, let them make more requests. + if (isset($request_state['viewer'])) { + $viewer = $request_state['viewer']; + if ($viewer->isLoggedIn()) { + $score = 0.25; + } + } + + return $score; + } + + protected function getRateLimitReason($score) { + $client_key = $this->getClientKey(); + + // NOTE: This happens before we load libraries, so we can not use pht() + // here. + + return + "TOO MANY REQUESTS\n". + "You (\"{$client_key}\") are issuing too many requests ". + "too quickly.\n"; + } + +} diff --git a/support/PhabricatorStartup.php b/support/startup/PhabricatorStartup.php similarity index 73% rename from support/PhabricatorStartup.php rename to support/startup/PhabricatorStartup.php index 3d771a24f7..41164fbd84 100644 --- a/support/PhabricatorStartup.php +++ b/support/startup/PhabricatorStartup.php @@ -46,11 +46,7 @@ final class PhabricatorStartup { private static $oldMemoryLimit; private static $phases; - // TODO: For now, disable rate limiting entirely by default. We need to - // iterate on it a bit for Conduit, some of the specific score levels, and - // to deal with NAT'd offices. - private static $maximumRate = 0; - private static $rateLimitToken; + private static $limits = array(); /* -( Accessing Request Information )-------------------------------------- */ @@ -138,10 +134,7 @@ final class PhabricatorStartup { // we can switch over to relying on our own exception recovery mechanisms. ini_set('display_errors', 0); - $rate_token = self::getRateLimitToken(); - if ($rate_token !== null) { - self::rateLimitRequest($rate_token); - } + self::connectRateLimits(); self::normalizeInput(); @@ -193,7 +186,7 @@ final class PhabricatorStartup { } public static function loadCoreLibraries() { - $phabricator_root = dirname(dirname(__FILE__)); + $phabricator_root = dirname(dirname(dirname(__FILE__))); $libraries_root = dirname($phabricator_root); $root = null; @@ -683,269 +676,66 @@ final class PhabricatorStartup { /** - * Adjust the permissible rate limit score. + * Add a new client limits. * - * By default, the limit is `1000`. You can use this method to set it to - * a larger or smaller value. If you set it to `2000`, users may make twice - * as many requests before rate limiting. + * @param PhabricatorClientLimit New limit. + * @return PhabricatorClientLimit The limit. + */ + public static function addRateLimit(PhabricatorClientLimit $limit) { + self::$limits[] = $limit; + return $limit; + } + + + /** + * Apply configured rate limits. + * + * If any limit is exceeded, this method terminates the request. * - * @param int Maximum score before rate limiting. * @return void * @task ratelimit */ - public static function setMaximumRate($rate) { - self::$maximumRate = $rate; - } + private static function connectRateLimits() { + $limits = self::$limits; - - /** - * Set a token to identify the client for purposes of rate limiting. - * - * By default, the `REMOTE_ADDR` is used. If your install is behind a load - * balancer, you may want to parse `X-Forwarded-For` and use that address - * instead. - * - * @param string Client identity for rate limiting. - */ - public static function setRateLimitToken($token) { - self::$rateLimitToken = $token; - } - - - /** - * Get the current client identity for rate limiting. - */ - public static function getRateLimitToken() { - if (self::$rateLimitToken !== null) { - return self::$rateLimitToken; + $reason = null; + $connected = array(); + foreach ($limits as $limit) { + $reason = $limit->didConnect(); + $connected[] = $limit; + if ($reason !== null) { + break; + } } - if (isset($_SERVER['REMOTE_ADDR'])) { - return $_SERVER['REMOTE_ADDR']; - } + // If we're killing the request here, disconnect any limits that we + // connected to try to keep the accounting straight. + if ($reason !== null) { + foreach ($connected as $limit) { + $limit->didDisconnect(array()); + } - return null; - } - - - /** - * Check if the user (identified by `$user_identity`) has issued too many - * requests recently. If they have, end the request with a 429 error code. - * - * The key just needs to identify the user. Phabricator uses both user PHIDs - * and user IPs as keys, tracking logged-in and logged-out users separately - * and enforcing different limits. - * - * @param string Some key which identifies the user making the request. - * @return void If the user has exceeded the rate limit, this method - * does not return. - * @task ratelimit - */ - public static function rateLimitRequest($user_identity) { - if (!self::canRateLimit()) { - return; - } - - $score = self::getRateLimitScore($user_identity); - $limit = self::$maximumRate * self::getRateLimitBucketCount(); - if ($score > $limit) { - // Give the user some bonus points for getting rate limited. This keeps - // bad actors who keep slamming the 429 page locked out completely, - // instead of letting them get a burst of requests through every minute - // after a bucket expires. - $penalty = 50; - - self::addRateLimitScore($user_identity, $penalty); - $score += $penalty; - - self::didRateLimit($user_identity, $score, $limit); + self::didRateLimit($reason); } } /** - * Add points to the rate limit score for some user. + * Tear down rate limiting and allow limits to score the request. * - * If users have earned more than 1000 points per minute across all the - * buckets they'll be locked out of the application, so awarding 1 point per - * request roughly corresponds to allowing 1000 requests per second, while - * awarding 50 points roughly corresponds to allowing 20 requests per second. - * - * @param string Some key which identifies the user making the request. - * @param float The cost for this request; more points pushes them toward - * the limit faster. + * @param map Additional, freeform request state. * @return void * @task ratelimit */ - public static function addRateLimitScore($user_identity, $score) { - if (!self::canRateLimit()) { - return; - } + public static function disconnectRateLimits(array $request_state) { + $limits = self::$limits; - $is_apcu = (bool)function_exists('apcu_fetch'); - $current = self::getRateLimitBucket(); - - // There's a bit of a race here, if a second process reads the bucket - // before this one writes it, but it's fine if we occasionally fail to - // record a user's score. If they're making requests fast enough to hit - // rate limiting, we'll get them soon enough. - - $bucket_key = self::getRateLimitBucketKey($current); - if ($is_apcu) { - $bucket = apcu_fetch($bucket_key); - } else { - $bucket = apc_fetch($bucket_key); - } - - if (!is_array($bucket)) { - $bucket = array(); - } - - if (empty($bucket[$user_identity])) { - $bucket[$user_identity] = 0; - } - - $bucket[$user_identity] += $score; - - if ($is_apcu) { - apcu_store($bucket_key, $bucket); - } else { - apc_store($bucket_key, $bucket); + foreach ($limits as $limit) { + $limit->didDisconnect($request_state); } } - /** - * Determine if rate limiting is available. - * - * Rate limiting depends on APC, and isn't available unless the APC user - * cache is available. - * - * @return bool True if rate limiting is available. - * @task ratelimit - */ - private static function canRateLimit() { - - if (!self::$maximumRate) { - return false; - } - - if (!function_exists('apc_fetch') && !function_exists('apcu_fetch')) { - return false; - } - - return true; - } - - - /** - * Get the current bucket for storing rate limit scores. - * - * @return int The current bucket. - * @task ratelimit - */ - private static function getRateLimitBucket() { - return (int)(time() / 60); - } - - - /** - * Get the total number of rate limit buckets to retain. - * - * @return int Total number of rate limit buckets to retain. - * @task ratelimit - */ - private static function getRateLimitBucketCount() { - return 5; - } - - - /** - * Get the APC key for a given bucket. - * - * @param int Bucket to get the key for. - * @return string APC key for the bucket. - * @task ratelimit - */ - private static function getRateLimitBucketKey($bucket) { - return 'rate:bucket:'.$bucket; - } - - - /** - * Get the APC key for the smallest stored bucket. - * - * @return string APC key for the smallest stored bucket. - * @task ratelimit - */ - private static function getRateLimitMinKey() { - return 'rate:min'; - } - - - /** - * Get the current rate limit score for a given user. - * - * @param string Unique key identifying the user. - * @return float The user's current score. - * @task ratelimit - */ - private static function getRateLimitScore($user_identity) { - $is_apcu = (bool)function_exists('apcu_fetch'); - - $min_key = self::getRateLimitMinKey(); - - // Identify the oldest bucket stored in APC. - $cur = self::getRateLimitBucket(); - if ($is_apcu) { - $min = apcu_fetch($min_key); - } else { - $min = apc_fetch($min_key); - } - - // If we don't have any buckets stored yet, store the current bucket as - // the oldest bucket. - if (!$min) { - if ($is_apcu) { - apcu_store($min_key, $cur); - } else { - apc_store($min_key, $cur); - } - $min = $cur; - } - - // Destroy any buckets that are older than the minimum bucket we're keeping - // track of. Under load this normally shouldn't do anything, but will clean - // up an old bucket once per minute. - $count = self::getRateLimitBucketCount(); - for ($cursor = $min; $cursor < ($cur - $count); $cursor++) { - $bucket_key = self::getRateLimitBucketKey($cursor); - if ($is_apcu) { - apcu_delete($bucket_key); - apcu_store($min_key, $cursor + 1); - } else { - apc_delete($bucket_key); - apc_store($min_key, $cursor + 1); - } - } - - // Now, sum up the user's scores in all of the active buckets. - $score = 0; - for (; $cursor <= $cur; $cursor++) { - $bucket_key = self::getRateLimitBucketKey($cursor); - if ($is_apcu) { - $bucket = apcu_fetch($bucket_key); - } else { - $bucket = apc_fetch($bucket_key); - } - if (isset($bucket[$user_identity])) { - $score += $bucket[$user_identity]; - } - } - - return $score; - } - /** * Emit an HTTP 429 "Too Many Requests" response (indicating that the user @@ -954,18 +744,13 @@ final class PhabricatorStartup { * @return exit This method **does not return**. * @task ratelimit */ - private static function didRateLimit($user_identity, $score, $limit) { - $message = - "TOO MANY REQUESTS\n". - "You (\"{$user_identity}\") are issuing too many requests ". - "too quickly.\n"; - + private static function didRateLimit($reason) { header( 'Content-Type: text/plain; charset=utf-8', $replace = true, $http_error = 429); - echo $message; + echo $reason; exit(1); } diff --git a/webroot/index.php b/webroot/index.php index 59e5b71075..5c7d79bfa1 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -37,7 +37,12 @@ function phabricator_startup() { // Load the PhabricatorStartup class itself. $t_startup = microtime(true); $root = dirname(dirname(__FILE__)); - require_once $root.'/support/PhabricatorStartup.php'; + require_once $root.'/support/startup/PhabricatorStartup.php'; + + // Load client limit classes so the preamble can configure limits. + require_once $root.'/support/startup/PhabricatorClientLimit.php'; + require_once $root.'/support/startup/PhabricatorClientRateLimit.php'; + require_once $root.'/support/startup/PhabricatorClientConnectionLimit.php'; // If the preamble script exists, load it. $t_preamble = microtime(true); From acb145b3d7adb3d4ce986ccfa9ead4fe90a64641 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 12 Oct 2017 16:26:53 -0700 Subject: [PATCH 10/11] Allow duplicates and merged-in tasks to be queried with `edge.search` Summary: See PHI147. Test Plan: Called the method from the web UI, got sensible results. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D18706 --- .../ManiphestTaskHasDuplicateTaskEdgeType.php | 14 ++++++++++++++ .../ManiphestTaskIsDuplicateOfTaskEdgeType.php | 15 +++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/applications/maniphest/edge/ManiphestTaskHasDuplicateTaskEdgeType.php b/src/applications/maniphest/edge/ManiphestTaskHasDuplicateTaskEdgeType.php index b5f5b44ae3..6d41689ba4 100644 --- a/src/applications/maniphest/edge/ManiphestTaskHasDuplicateTaskEdgeType.php +++ b/src/applications/maniphest/edge/ManiphestTaskHasDuplicateTaskEdgeType.php @@ -13,4 +13,18 @@ final class ManiphestTaskHasDuplicateTaskEdgeType return true; } + public function getConduitKey() { + return 'task.merged-in'; + } + + public function getConduitName() { + return pht('Merged In'); + } + + public function getConduitDescription() { + return pht( + 'The source task has had the destination task closed as a '. + 'duplicate and merged into it.'); + } + } diff --git a/src/applications/maniphest/edge/ManiphestTaskIsDuplicateOfTaskEdgeType.php b/src/applications/maniphest/edge/ManiphestTaskIsDuplicateOfTaskEdgeType.php index 8c0e2a752d..3fafadc0f4 100644 --- a/src/applications/maniphest/edge/ManiphestTaskIsDuplicateOfTaskEdgeType.php +++ b/src/applications/maniphest/edge/ManiphestTaskIsDuplicateOfTaskEdgeType.php @@ -13,4 +13,19 @@ final class ManiphestTaskIsDuplicateOfTaskEdgeType return true; } + public function getConduitKey() { + return 'task.duplicate'; + } + + public function getConduitName() { + return pht('Closed as Duplicate'); + } + + public function getConduitDescription() { + return pht( + 'The source task has been closed as a duplicate of the '. + 'destination task.'); + } + + } From c5e8de945020ea0fe08f6c8f00784b1fc91a3d58 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 13 Oct 2017 13:38:47 -0700 Subject: [PATCH 11/11] Make `bin/storage dump` insert CREATE DATABASE and USE statements Summary: Ref T13000. The new approach for dumping database-by-database means that we don't get CREATE DATABASE or USE statements, which makes importing the dump again inconvenient. Manually stitch these into the dump. Test Plan: - Used `bin/storage dump --namespace ...` to dump a smaller local instance. - Used `bin/storage destroy --namespace ...`, to destroy the namespace, then inported the dump cleanly. - Verified that each CREATE DATABASE statement appears only once. - Verified that `bin/storage renamespace --live` can correctly process this file. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13000 Differential Revision: https://secure.phabricator.com/D18707 --- ...abricatorStorageManagementDumpWorkflow.php | 67 +++++++++++++------ 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php index 17491d55e9..88bd80a9a8 100644 --- a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php +++ b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php @@ -215,7 +215,10 @@ final class PhabricatorStorageManagementDumpWorkflow $target['table']); } - $commands[] = $command; + $commands[] = array( + 'command' => $command, + 'database' => $target['database'], + ); } @@ -244,9 +247,26 @@ final class PhabricatorStorageManagementDumpWorkflow $file)); } + $created = array(); + try { - foreach ($commands as $command) { - $future = new ExecFuture('%C', $command); + foreach ($commands as $spec) { + // Because we're dumping database-by-database, we need to generate our + // own CREATE DATABASE and USE statements. + + $database = $spec['database']; + $preamble = array(); + if (!isset($created[$database])) { + $preamble[] = + "CREATE DATABASE /*!32312 IF NOT EXISTS*/ `{$database}` ". + "/*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */;\n"; + $created[$database] = true; + } + $preamble[] = "USE `{$database}`;\n"; + $preamble = implode('', $preamble); + $this->writeData($preamble, $file, $is_compress, $output_file); + + $future = new ExecFuture('%C', $spec['command']); $iterator = id(new FutureIterator(array($future))) ->setUpdateInterval(0.100); @@ -258,23 +278,7 @@ final class PhabricatorStorageManagementDumpWorkflow fwrite(STDERR, $stderr); } - if (strlen($stdout)) { - if (!$file) { - $ok = fwrite(STDOUT, $stdout); - } else if ($is_compress) { - $ok = gzwrite($file, $stdout); - } else { - $ok = fwrite($file, $stdout); - } - - if ($ok !== strlen($stdout)) { - throw new Exception( - pht( - 'Failed to write %d byte(s) to file "%s".', - new PhutilNumber(strlen($stdout)), - $output_file)); - } - } + $this->writeData($stdout, $file, $is_compress, $output_file); if ($ready !== null) { $ready->resolvex(); @@ -314,4 +318,27 @@ final class PhabricatorStorageManagementDumpWorkflow return 0; } + + private function writeData($data, $file, $is_compress, $output_file) { + if (!strlen($data)) { + return; + } + + if (!$file) { + $ok = fwrite(STDOUT, $data); + } else if ($is_compress) { + $ok = gzwrite($file, $data); + } else { + $ok = fwrite($file, $data); + } + + if ($ok !== strlen($data)) { + throw new Exception( + pht( + 'Failed to write %d byte(s) to file "%s".', + new PhutilNumber(strlen($data)), + $output_file)); + } + } + }