From f2980dd740fb03b81851a840603460b4c444bc31 Mon Sep 17 00:00:00 2001 From: Webbeh <webbeh@1160608.no-reply.drupal.org> Date: Tue, 11 Oct 2022 13:01:59 +0000 Subject: [PATCH] Issue #3312937 by kunal.sachdev, Webbeh: Fix spelling mistakes --- automatic_updates.module | 1 - package_manager/package_manager.module | 2 ++ package_manager/src/Event/RequireEventTrait.php | 4 ++-- package_manager/src/FailureMarker.php | 2 +- package_manager/src/ProcessFactory.php | 2 ++ package_manager/tests/src/Kernel/StageTest.php | 4 ++-- .../tests/src/Kernel/StageValidationExceptionTest.php | 2 +- package_manager/tests/src/Unit/InstalledPackagesDataTest.php | 2 +- package_manager/tests/src/Unit/PathLocatorTest.php | 4 ++-- src/ReleaseChooser.php | 2 +- .../new_project_added/active/vendor/composer/installed.json | 2 +- .../new_project_added/staged/vendor/composer/installed.json | 2 +- .../no_errors/active/vendor/composer/installed.json | 2 +- .../no_errors/staged/vendor/composer/installed.json | 2 +- .../project_removed/active/vendor/composer/installed.json | 2 +- .../project_removed/staged/vendor/composer/installed.json | 2 +- .../version_changed/active/vendor/composer/installed.json | 2 +- .../version_changed/staged/vendor/composer/installed.json | 2 +- .../automatic_updates_test/automatic_updates_test.module | 2 +- tests/src/Functional/UpdaterFormTest.php | 2 +- .../ReadinessValidation/StagedProjectsValidatorTest.php | 2 +- 21 files changed, 25 insertions(+), 22 deletions(-) diff --git a/automatic_updates.module b/automatic_updates.module index e8a71bd01d..3a4373ee7d 100644 --- a/automatic_updates.module +++ b/automatic_updates.module @@ -135,7 +135,6 @@ function automatic_updates_module_implements_alter(&$implementations, $hook) { unset($implementations['update']); } if ($hook === 'cron') { - // Whatever mofo. $hook = $implementations['automatic_updates']; unset($implementations['automatic_updates']); $implementations['automatic_updates'] = $hook; diff --git a/package_manager/package_manager.module b/package_manager/package_manager.module index f369d8419a..3fdd45ade2 100644 --- a/package_manager/package_manager.module +++ b/package_manager/package_manager.module @@ -8,6 +8,8 @@ use Drupal\Core\Routing\RouteMatchInterface; use Drupal\package_manager\Validator\ComposerExecutableValidator; +// cspell:ignore grasmash + /** * Implements hook_help(). */ diff --git a/package_manager/src/Event/RequireEventTrait.php b/package_manager/src/Event/RequireEventTrait.php index f938539673..96d4c0d3bf 100644 --- a/package_manager/src/Event/RequireEventTrait.php +++ b/package_manager/src/Event/RequireEventTrait.php @@ -35,9 +35,9 @@ trait RequireEventTrait { * The stage. * @param string[] $runtime_packages * The runtime (i.e., non-dev) packages to be required, in the form - * 'vendor/name:constrant'. + * 'vendor/name:constraint'. * @param string[] $dev_packages - * The dev packages to be required, in the form 'vendor/name:constrant'. + * The dev packages to be required, in the form 'vendor/name:constraint'. */ public function __construct(Stage $stage, array $runtime_packages, array $dev_packages = []) { $this->runtimePackages = $runtime_packages; diff --git a/package_manager/src/FailureMarker.php b/package_manager/src/FailureMarker.php index 14b5ee90e5..dab1e88f9a 100644 --- a/package_manager/src/FailureMarker.php +++ b/package_manager/src/FailureMarker.php @@ -12,7 +12,7 @@ use Drupal\package_manager\Exception\ApplyFailedException; * code is copied back into it, and then removed afterwards. This allows us to * know if a commit operation failed midway through, which could leave the site * code base in an indeterminate state -- which, in the worst case scenario, - * might render Drupal unbootable. + * might render Drupal being unable to boot. */ final class FailureMarker { diff --git a/package_manager/src/ProcessFactory.php b/package_manager/src/ProcessFactory.php index e3cfd03514..b0d40141ed 100644 --- a/package_manager/src/ProcessFactory.php +++ b/package_manager/src/ProcessFactory.php @@ -8,6 +8,8 @@ use PhpTuf\ComposerStager\Infrastructure\Factory\Process\ProcessFactoryInterface use PhpTuf\ComposerStager\Infrastructure\Factory\Process\ProcessFactory as StagerProcessFactory; use Symfony\Component\Process\Process; +// cspell:ignore BINDIR + /** * Defines a process factory which sets the COMPOSER_HOME environment variable. * diff --git a/package_manager/tests/src/Kernel/StageTest.php b/package_manager/tests/src/Kernel/StageTest.php index 1acb0f3839..392d1eea7b 100644 --- a/package_manager/tests/src/Kernel/StageTest.php +++ b/package_manager/tests/src/Kernel/StageTest.php @@ -355,7 +355,7 @@ class StageTest extends PackageManagerKernelTestBase { $stage->destroy(); // Even through the previous stage was destroyed, we cannot create a new one - // bceause the failure marker is still there. + // because the failure marker is still there. $stage = $this->createStage(); try { $stage->create(); @@ -444,7 +444,7 @@ class StageTest extends PackageManagerKernelTestBase { * @param string $package_name * The package name. * @param bool $is_invalid - * TRUE if the gien package name is invalid and will cause an exception, + * TRUE if the given package name is invalid and will cause an exception, * FALSE otherwise. * * @dataProvider providerValidatePackageNames diff --git a/package_manager/tests/src/Kernel/StageValidationExceptionTest.php b/package_manager/tests/src/Kernel/StageValidationExceptionTest.php index b169da5867..5fe49b2b42 100644 --- a/package_manager/tests/src/Kernel/StageValidationExceptionTest.php +++ b/package_manager/tests/src/Kernel/StageValidationExceptionTest.php @@ -28,7 +28,7 @@ class StageValidationExceptionTest extends PackageManagerKernelTestBase { * The test cases. */ public function providerResultsAsText(): array { - $messages = ['Blam!', 'Kapow!']; + $messages = ['Bang!', 'Pow!']; $summary = t('There was sadness.'); $result_no_summary = ValidationResult::createError([$messages[0]]); diff --git a/package_manager/tests/src/Unit/InstalledPackagesDataTest.php b/package_manager/tests/src/Unit/InstalledPackagesDataTest.php index 606d2e2fa7..eb4a859e7b 100644 --- a/package_manager/tests/src/Unit/InstalledPackagesDataTest.php +++ b/package_manager/tests/src/Unit/InstalledPackagesDataTest.php @@ -19,7 +19,7 @@ class InstalledPackagesDataTest extends UnitTestCase { /** * Tests that Composer's `installed.php` file looks how we expect. */ - public function testinstalledPackagesData(): void { + public function testInstalledPackagesData(): void { $loaders = ClassLoader::getRegisteredLoaders(); $installed_php = key($loaders) . '/composer/installed.php'; $this->assertFileIsReadable($installed_php); diff --git a/package_manager/tests/src/Unit/PathLocatorTest.php b/package_manager/tests/src/Unit/PathLocatorTest.php index 1bcc0b8b1c..5f4157f284 100644 --- a/package_manager/tests/src/Unit/PathLocatorTest.php +++ b/package_manager/tests/src/Unit/PathLocatorTest.php @@ -20,7 +20,7 @@ class PathLocatorTest extends UnitTestCase { public function testStagingRoot(): void { $config_factory = $this->getConfigFactoryStub([ 'system.site' => [ - 'uuid' => 'my_site_id', + 'uuid' => '_my_site_id', ], ]); $file_system = $this->prophesize(FileSystemInterface::class); @@ -31,7 +31,7 @@ class PathLocatorTest extends UnitTestCase { $config_factory, $file_system->reveal() ); - $this->assertSame('/path/to/temp/.package_managermy_site_id', $path_locator->getStagingRoot()); + $this->assertSame('/path/to/temp/.package_manager_my_site_id', $path_locator->getStagingRoot()); } /** diff --git a/src/ReleaseChooser.php b/src/ReleaseChooser.php index d620f18131..5e819ce064 100644 --- a/src/ReleaseChooser.php +++ b/src/ReleaseChooser.php @@ -47,7 +47,7 @@ final class ReleaseChooser { * The updater that will be used to install the releases. * * @return \Drupal\update\ProjectRelease[] - * The releases that are installable by the given updtaer, according to the + * The releases that are installable by the given updater, according to the * version validator service. */ protected function getInstallableReleases(Updater $updater): array { diff --git a/tests/fixtures/StagedProjectsValidatorTest/new_project_added/active/vendor/composer/installed.json b/tests/fixtures/StagedProjectsValidatorTest/new_project_added/active/vendor/composer/installed.json index 1f6de85d07..651fd0e635 100644 --- a/tests/fixtures/StagedProjectsValidatorTest/new_project_added/active/vendor/composer/installed.json +++ b/tests/fixtures/StagedProjectsValidatorTest/new_project_added/active/vendor/composer/installed.json @@ -1,6 +1,6 @@ { "_readme": [ - "This file simuluates a list of packages installed in the active directory of a virtual project.", + "This file simulates a list of packages installed in the active directory of a virtual project.", "It will be compared against staged.installed.json.", "See \\Drupal\\Tests\\automatic_updates\\Kernel\\ReadinessValidation\\StagedProjectsValidatorTest::testErrors()" ], diff --git a/tests/fixtures/StagedProjectsValidatorTest/new_project_added/staged/vendor/composer/installed.json b/tests/fixtures/StagedProjectsValidatorTest/new_project_added/staged/vendor/composer/installed.json index b0bdf7c1a4..c7575498f1 100644 --- a/tests/fixtures/StagedProjectsValidatorTest/new_project_added/staged/vendor/composer/installed.json +++ b/tests/fixtures/StagedProjectsValidatorTest/new_project_added/staged/vendor/composer/installed.json @@ -1,6 +1,6 @@ { "_readme": [ - "This file simuluates a list of packages installed in a virtual staging area.", + "This file simulates a list of packages installed in a virtual staging area.", "It will be compared against active.installed.json.", "See \\Drupal\\Tests\\automatic_updates\\Kernel\\ReadinessValidation\\StagedProjectsValidatorTest::testErrors()" ], diff --git a/tests/fixtures/StagedProjectsValidatorTest/no_errors/active/vendor/composer/installed.json b/tests/fixtures/StagedProjectsValidatorTest/no_errors/active/vendor/composer/installed.json index 6b93669c33..7f666647f8 100644 --- a/tests/fixtures/StagedProjectsValidatorTest/no_errors/active/vendor/composer/installed.json +++ b/tests/fixtures/StagedProjectsValidatorTest/no_errors/active/vendor/composer/installed.json @@ -1,6 +1,6 @@ { "_readme": [ - "This file simuluates a list of packages installed in the active directory of a virtual project.", + "This file simulates a list of packages installed in the active directory of a virtual project.", "It will be compared against staged.installed.json.", "See \\Drupal\\Tests\\automatic_updates\\Kernel\\ReadinessValidation\\StagedProjectsValidatorTest::testErrors()" ], diff --git a/tests/fixtures/StagedProjectsValidatorTest/no_errors/staged/vendor/composer/installed.json b/tests/fixtures/StagedProjectsValidatorTest/no_errors/staged/vendor/composer/installed.json index ee87bd5e9e..a099177f82 100644 --- a/tests/fixtures/StagedProjectsValidatorTest/no_errors/staged/vendor/composer/installed.json +++ b/tests/fixtures/StagedProjectsValidatorTest/no_errors/staged/vendor/composer/installed.json @@ -1,6 +1,6 @@ { "_readme": [ - "This file simuluates a list of packages installed in a virtual staging area.", + "This file simulates a list of packages installed in a virtual staging area.", "It will be compared against active.installed.json.", "See \\Drupal\\Tests\\automatic_updates\\Kernel\\ReadinessValidation\\StagedProjectsValidatorTest::testErrors()" ], diff --git a/tests/fixtures/StagedProjectsValidatorTest/project_removed/active/vendor/composer/installed.json b/tests/fixtures/StagedProjectsValidatorTest/project_removed/active/vendor/composer/installed.json index 6e2ecb6b9f..f6153d31e5 100644 --- a/tests/fixtures/StagedProjectsValidatorTest/project_removed/active/vendor/composer/installed.json +++ b/tests/fixtures/StagedProjectsValidatorTest/project_removed/active/vendor/composer/installed.json @@ -1,6 +1,6 @@ { "_readme": [ - "This file simuluates a list of packages installed in the active directory of a virtual project.", + "This file simulates a list of packages installed in the active directory of a virtual project.", "It will be compared against staged.installed.json.", "See \\Drupal\\Tests\\automatic_updates\\Kernel\\ReadinessValidation\\StagedProjectsValidatorTest::testErrors()" ], diff --git a/tests/fixtures/StagedProjectsValidatorTest/project_removed/staged/vendor/composer/installed.json b/tests/fixtures/StagedProjectsValidatorTest/project_removed/staged/vendor/composer/installed.json index c44eb0104d..603134a067 100644 --- a/tests/fixtures/StagedProjectsValidatorTest/project_removed/staged/vendor/composer/installed.json +++ b/tests/fixtures/StagedProjectsValidatorTest/project_removed/staged/vendor/composer/installed.json @@ -1,6 +1,6 @@ { "_readme": [ - "This file simuluates a list of packages installed in a virtual staging area.", + "This file simulates a list of packages installed in a virtual staging area.", "It will be compared against active.installed.json.", "See \\Drupal\\Tests\\automatic_updates\\Kernel\\ReadinessValidation\\StagedProjectsValidatorTest::testErrors()" ], diff --git a/tests/fixtures/StagedProjectsValidatorTest/version_changed/active/vendor/composer/installed.json b/tests/fixtures/StagedProjectsValidatorTest/version_changed/active/vendor/composer/installed.json index cb7c3ca5ef..fc2e937eb7 100644 --- a/tests/fixtures/StagedProjectsValidatorTest/version_changed/active/vendor/composer/installed.json +++ b/tests/fixtures/StagedProjectsValidatorTest/version_changed/active/vendor/composer/installed.json @@ -1,6 +1,6 @@ { "_readme": [ - "This file simuluates a list of packages installed in the active directory of a virtual project.", + "This file simulates a list of packages installed in the active directory of a virtual project.", "It will be compared against staged.installed.json.", "See \\Drupal\\Tests\\automatic_updates\\Kernel\\ReadinessValidation\\StagedProjectsValidatorTest::testErrors()" ], diff --git a/tests/fixtures/StagedProjectsValidatorTest/version_changed/staged/vendor/composer/installed.json b/tests/fixtures/StagedProjectsValidatorTest/version_changed/staged/vendor/composer/installed.json index e457476ace..4b74a4d88c 100644 --- a/tests/fixtures/StagedProjectsValidatorTest/version_changed/staged/vendor/composer/installed.json +++ b/tests/fixtures/StagedProjectsValidatorTest/version_changed/staged/vendor/composer/installed.json @@ -1,6 +1,6 @@ { "_readme": [ - "This file simuluates a list of packages installed in a virtual staging area.", + "This file simulates a list of packages installed in a virtual staging area.", "It will be compared against active.installed.json.", "See \\Drupal\\Tests\\automatic_updates\\Kernel\\ReadinessValidation\\StagedProjectsValidatorTest::testErrors()" ], diff --git a/tests/modules/automatic_updates_test/automatic_updates_test.module b/tests/modules/automatic_updates_test/automatic_updates_test.module index 2aec23f238..9d8022ec57 100644 --- a/tests/modules/automatic_updates_test/automatic_updates_test.module +++ b/tests/modules/automatic_updates_test/automatic_updates_test.module @@ -14,7 +14,7 @@ function automatic_updates_test_mail_alter(array &$message): void { if (str_starts_with($message['id'], 'automatic_updates_')) { $line_langcodes = []; - // Get the langcode of every translated line in the mssage, including the + // Get the langcode of every translated line in the message, including the // subject line. $lines = array_merge($message['body'], [ $message['subject'], diff --git a/tests/src/Functional/UpdaterFormTest.php b/tests/src/Functional/UpdaterFormTest.php index d0b976e991..0600764b72 100644 --- a/tests/src/Functional/UpdaterFormTest.php +++ b/tests/src/Functional/UpdaterFormTest.php @@ -332,7 +332,7 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase { $this->checkForMetaRefresh(); $this->assertUpdateStagedTimes(1); - Committer::setException(new \Exception('failed at commiter')); + Committer::setException(new \Exception('failed at committer')); $page->pressButton('Continue'); $this->checkForMetaRefresh(); $assert_session->pageTextContainsOnce('An error has occurred.'); diff --git a/tests/src/Kernel/ReadinessValidation/StagedProjectsValidatorTest.php b/tests/src/Kernel/ReadinessValidation/StagedProjectsValidatorTest.php index eac85e7c2c..94fd7fb524 100644 --- a/tests/src/Kernel/ReadinessValidation/StagedProjectsValidatorTest.php +++ b/tests/src/Kernel/ReadinessValidation/StagedProjectsValidatorTest.php @@ -81,7 +81,7 @@ class StagedProjectsValidatorTest extends AutomaticUpdatesKernelTestBase { * Tests validation errors, or lack thereof. * * @param string $root_fixture_directory - * A directory containing to fixtures sub direcotories, 'active' and + * A directory containing to fixtures sub-directories, 'active' and * 'staged'. * @param string|null $expected_summary * The expected error summary, or NULL if no errors are expected. -- GitLab