diff --git a/.github/ISSUE_TEMPLATE/cms-collaboration-cycle-request.yml b/.github/ISSUE_TEMPLATE/cms-collaboration-cycle-request.yml index 900a0c4abe..1350df3544 100644 --- a/.github/ISSUE_TEMPLATE/cms-collaboration-cycle-request.yml +++ b/.github/ISSUE_TEMPLATE/cms-collaboration-cycle-request.yml @@ -1,5 +1,5 @@ -name: CMS Collaboration Cycle Request +name: "CMS Collaboration Cycle Request" description: Use this template to begin engaging with the CMS Collaboration Cycle. title: "CMS Collaboration Cycle for [Team Name, Product Name, Feature Name]" labels: CMS Team, Needs Analysis, CMS-Collab-Cycle, Epic @@ -11,7 +11,7 @@ body: - type: markdown attributes: value: | - Before engaging with the CMS Collaboration Cycle, please fill out the form below to help the CMS Team determine what level of support and which touchpoints are needed for your work. Have questions about this form? Reach out to the CMS Team in the cms-support Slack channel. + Before engaging with the CMS Collaboration Cycle, please fill out the form below to help the CMS Team determine what level of support and which touchpoints are needed for your work. Have questions about this form? Read our [Kickoff Request documentation](https://github.com/department-of-veterans-affairs/va.gov-team/blob/master/platform/cms/collaboration-cycle/kickoff.md) in Github or reach out to the CMS Team in the cms-support Slack channel. - type: input id: product-outline attributes: @@ -64,7 +64,7 @@ body: - type: dropdown id: research attributes: - label: Are you doing user research with CMS editors? + label: Will you be doing user research with CMS editors? multiple: false options: - "Yes" @@ -83,6 +83,17 @@ body: - "Maybe (Leave notes in the Additional Information section of this form)" validations: required: true + - type: dropdown + id: DS + attributes: + label: Will your work require introducing a new CMS Design System component or changes to an existing component? + multiple: false + options: + - "Yes" + - "No" + - "Maybe (Leave notes in the Additional Information section of this form)" + validations: + required: true - type: dropdown id: modules attributes: @@ -94,10 +105,21 @@ body: - "Maybe (Leave notes in the Additional Information section of this form)" validations: required: true + - type: dropdown + id: fields + attributes: + label: Will your work require introducing new input fields or making changes to existing input fields? + multiple: false + options: + - "Yes" + - "No" + - "Maybe (Leave notes in the Additional Information section of this form)" + validations: + required: true - type: dropdown id: analytics attributes: - label: Do you need to capture any analytics or metrics? + label: Will this work require you to capture any analytics or metrics? multiple: false options: - "Yes" diff --git a/composer.json b/composer.json index 78fff006f5..583235bf50 100644 --- a/composer.json +++ b/composer.json @@ -8,6 +8,7 @@ "require-dev": { "behat/mink": "^1.10", "behat/mink-browserkit-driver": "^2.1", + "digitalrevolution/php-codesniffer-baseline": "^1.1", "drupal/devel": "^5.0", "drupal/html_tag_usage": "^1.0@beta", "drupal/media_entity_generic": "^1.0" @@ -82,7 +83,7 @@ "drupal/geofield_map": "^3.0", "drupal/google_analytics": "^4.0", "drupal/govdelivery_bulletins": "^1.2", - "drupal/graphql": "3.1.0", + "drupal/graphql": "^3.4", "drupal/graphql_core": "^3.1.0", "drupal/graphql_menu": "^1.0@alpha", "drupal/graphql_metatag": "^1.0", @@ -207,7 +208,7 @@ "symfony/phpunit-bridge": "^5.1", "symfony/process": "^4.0", "symfony/routing": "^4.0", - "va-gov/content-build": "^0.0.3383", + "va-gov/content-build": "^0.0.3387", "vlucas/phpdotenv": "^5.3", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3", @@ -289,7 +290,8 @@ "dealerdirect/phpcodesniffer-composer-installer": true, "php-http/discovery": true, "cweagans/composer-patches": true, - "orakili/composer-drupal-info-file-patch-helper": true + "orakili/composer-drupal-info-file-patch-helper": true, + "digitalrevolution/php-codesniffer-baseline": true } }, "extra": { @@ -426,10 +428,6 @@ "drupal/flysystem_s3": { "3297257 - Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2023-04-27/3297257-drupal-10-compatibility-fixes_0.patch" }, - "drupal/graphql": { - "Fix Explorer with Layout Builder enabled - https://github.com/drupal-graphql/graphql/pull/1144": "patches/graphql_8x3x_layout_builder_incompat.patch", - "Remove outdated RouteQueryEnhancer controller reference - https://github.com/drupal-graphql/graphql/pull/1230": "patches/graphql_8x3x_query_route_enhancer_update.patch" - }, "drupal/hms_field": { "3351452 - Argument #1 ($seconds) must be of type string|int, null given": "https://www.drupal.org/files/issues/2023-03-31/hms_field-field_null_value-3351452-1.patch" }, diff --git a/composer.lock b/composer.lock index f2b07ddd4d..14fe3d0604 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a4aad9828ce96200f58c79b8835f2dbe", + "content-hash": "dc1ef17bd85e532906f75d7386c5a291", "packages": [ { "name": "alchemy/zippy", @@ -1271,16 +1271,16 @@ }, { "name": "datadog/dd-trace", - "version": "0.93.1", + "version": "0.93.2", "source": { "type": "git", "url": "https://github.com/DataDog/dd-trace-php.git", - "reference": "db7c775277d21e39d43bec8bd375c59d4b12c12c" + "reference": "7850350e97f1bc26466ccaf72d0b41cf2ade4127" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DataDog/dd-trace-php/zipball/db7c775277d21e39d43bec8bd375c59d4b12c12c", - "reference": "db7c775277d21e39d43bec8bd375c59d4b12c12c", + "url": "https://api.github.com/repos/DataDog/dd-trace-php/zipball/7850350e97f1bc26466ccaf72d0b41cf2ade4127", + "reference": "7850350e97f1bc26466ccaf72d0b41cf2ade4127", "shasum": "" }, "require": { @@ -1359,9 +1359,9 @@ ], "support": { "issues": "https://github.com/DataDog/dd-trace-php/issues", - "source": "https://github.com/DataDog/dd-trace-php/tree/0.93.1" + "source": "https://github.com/DataDog/dd-trace-php/tree/0.93.2" }, - "time": "2023-10-31T16:10:59+00:00" + "time": "2023-11-13T11:35:31+00:00" }, { "name": "davedevelopment/stiphle", @@ -6757,27 +6757,27 @@ }, { "name": "drupal/graphql", - "version": "3.1.0", + "version": "3.4.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/graphql.git", - "reference": "8.x-3.1" + "reference": "8.x-3.4" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/graphql-8.x-3.1.zip", - "reference": "8.x-3.1", - "shasum": "088430befbf13f2c8dadf1d9d14d01487e6f52bc" + "url": "https://ftp.drupal.org/files/projects/graphql-8.x-3.4.zip", + "reference": "8.x-3.4", + "shasum": "a00e8349a4e60083aa1bacbd8d7c782fca5f5738" }, "require": { - "drupal/core": "^8.8 || ^9", - "webonyx/graphql-php": "^0.12.5" + "drupal/core": "^9 || ^10", + "webonyx/graphql-php": "^14.11.8" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-3.1", - "datestamp": "1603962169", + "version": "8.x-3.4", + "datestamp": "1699463394", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -13225,17 +13225,17 @@ }, { "name": "drupal/views_conditional", - "version": "1.5.0", + "version": "1.9.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/views_conditional.git", - "reference": "8.x-1.5" + "reference": "8.x-1.9" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/views_conditional-8.x-1.5.zip", - "reference": "8.x-1.5", - "shasum": "bb7d13abc0919e01933152002b0bf4189e5e2d1a" + "url": "https://ftp.drupal.org/files/projects/views_conditional-8.x-1.9.zip", + "reference": "8.x-1.9", + "shasum": "0a3600d3c2120ce8702f72c741f3a1608b3e3c27" }, "require": { "drupal/core": "^9 || ^10" @@ -13243,8 +13243,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.5", - "datestamp": "1659989912", + "version": "8.x-1.9", + "datestamp": "1699473354", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -14365,24 +14365,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.1", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.1" + "phpoption/phpoption": "^1.9.2" }, "require-dev": { - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "autoload": { @@ -14411,7 +14411,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" }, "funding": [ { @@ -14423,7 +14423,7 @@ "type": "tidelift" } ], - "time": "2023-02-25T20:23:15+00:00" + "time": "2023-11-12T22:16:48+00:00" }, { "name": "grasmash/expander", @@ -16275,37 +16275,37 @@ }, { "name": "mglaman/phpstan-drupal", - "version": "1.2.1", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/mglaman/phpstan-drupal.git", - "reference": "920c6b972a832046327f66dc6ff7448e3b5d6e4c" + "reference": "57b2cc67fb4416e8484db37a3d8502ac8fb3c0d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/920c6b972a832046327f66dc6ff7448e3b5d6e4c", - "reference": "920c6b972a832046327f66dc6ff7448e3b5d6e4c", + "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/57b2cc67fb4416e8484db37a3d8502ac8fb3c0d6", + "reference": "57b2cc67fb4416e8484db37a3d8502ac8fb3c0d6", "shasum": "" }, "require": { "php": "^7.4 || ^8.0", "phpstan/phpstan": "^1.10.1", "phpstan/phpstan-deprecation-rules": "^1.1.4", - "symfony/finder": "~3.4.5 ||^4.2 || ^5.0 || ^6.0", - "symfony/yaml": "~3.4.5 || ^4.2|| ^5.0 || ^6.0", + "symfony/finder": "^4.2 || ^5.0 || ^6.0 || ^7.0", + "symfony/yaml": "^4.2|| ^5.0 || ^6.0 || ^7.0", "webflo/drupal-finder": "^1.2" }, "require-dev": { "behat/mink": "^1.8", "composer/installers": "^1.9", - "drupal/core-recommended": "^8.8@alpha || ^9.0", - "drush/drush": "^9.6 || ^10.0 || ^11", + "drupal/core-recommended": "^9.0", + "drush/drush": "^10.0 || ^11 || ^12", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^6.5 || ^7.5 || ^8.0 || ^9", + "phpunit/phpunit": "^8.5 || ^9", "slevomat/coding-standard": "^7.1", "squizlabs/php_codesniffer": "^3.3", - "symfony/phpunit-bridge": "^3.4.3 || ^4.4 || ^5.4 || ^6.0" + "symfony/phpunit-bridge": "^4.4 || ^5.4 || ^6.0 || ^7.0" }, "suggest": { "jangregor/phpstan-prophecy": "Provides a prophecy/prophecy extension for phpstan/phpstan.", @@ -16359,7 +16359,7 @@ "description": "Drupal extension and rules for PHPStan", "support": { "issues": "https://github.com/mglaman/phpstan-drupal/issues", - "source": "https://github.com/mglaman/phpstan-drupal/tree/1.2.1" + "source": "https://github.com/mglaman/phpstan-drupal/tree/1.2.4" }, "funding": [ { @@ -16375,7 +16375,7 @@ "type": "tidelift" } ], - "time": "2023-11-03T13:17:28+00:00" + "time": "2023-11-14T22:47:32+00:00" }, { "name": "michelf/php-markdown", @@ -18153,16 +18153,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.1", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { @@ -18170,7 +18170,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "extra": { @@ -18212,7 +18212,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { @@ -18224,7 +18224,7 @@ "type": "tidelift" } ], - "time": "2023-02-25T19:38:58+00:00" + "time": "2023-11-12T21:59:55+00:00" }, { "name": "phpspec/prophecy", @@ -26911,16 +26911,16 @@ }, { "name": "va-gov/content-build", - "version": "v0.0.3383", + "version": "v0.0.3387", "source": { "type": "git", "url": "https://github.com/department-of-veterans-affairs/content-build.git", - "reference": "ec4aa8360e1e4fc028a17c29408c6aad1ace4e26" + "reference": "917fa5884dd7db0d7f39ca56b21d758d4b3f417d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/department-of-veterans-affairs/content-build/zipball/ec4aa8360e1e4fc028a17c29408c6aad1ace4e26", - "reference": "ec4aa8360e1e4fc028a17c29408c6aad1ace4e26", + "url": "https://api.github.com/repos/department-of-veterans-affairs/content-build/zipball/917fa5884dd7db0d7f39ca56b21d758d4b3f417d", + "reference": "917fa5884dd7db0d7f39ca56b21d758d4b3f417d", "shasum": "" }, "type": "node-project", @@ -26947,37 +26947,37 @@ "description": "Front-end for VA.gov. This repository contains the code that generates the www.va.gov website. It contains a Metalsmith static site builder that uses a Drupal CMS for content. This file is here to publish releases to https://packagist.org/packages/va-gov/content-build, so that the CMS CI system can install it and update it using standard composer processes, and so that we can run tests across both systems. See https://github.com/department-of-veterans-affairs/va.gov-cms for the CMS repo, and stand by for more documentation.", "support": { "issues": "https://github.com/department-of-veterans-affairs/content-build/issues", - "source": "https://github.com/department-of-veterans-affairs/content-build/tree/v0.0.3383" + "source": "https://github.com/department-of-veterans-affairs/content-build/tree/v0.0.3387" }, - "time": "2023-11-07T23:50:06+00:00" + "time": "2023-11-15T16:10:47+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.5.0", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" + "graham-campbell/result-type": "^1.1.2", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.2", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -26989,7 +26989,7 @@ "forward-command": true }, "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -27021,7 +27021,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" }, "funding": [ { @@ -27033,7 +27033,7 @@ "type": "tidelift" } ], - "time": "2022-10-16T01:01:54+00:00" + "time": "2023-11-12T22:43:29+00:00" }, { "name": "webflo/drupal-finder", @@ -27190,26 +27190,36 @@ }, { "name": "webonyx/graphql-php", - "version": "v0.12.6", + "version": "v14.11.10", "source": { "type": "git", "url": "https://github.com/webonyx/graphql-php.git", - "reference": "4c545e5ec4fc37f6eb36c19f5a0e7feaf5979c95" + "reference": "d9c2fdebc6aa01d831bc2969da00e8588cffef19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/4c545e5ec4fc37f6eb36c19f5a0e7feaf5979c95", - "reference": "4c545e5ec4fc37f6eb36c19f5a0e7feaf5979c95", + "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/d9c2fdebc6aa01d831bc2969da00e8588cffef19", + "reference": "d9c2fdebc6aa01d831bc2969da00e8588cffef19", "shasum": "" }, "require": { + "ext-json": "*", "ext-mbstring": "*", - "php": ">=5.6" + "php": "^7.1 || ^8" }, "require-dev": { - "phpunit/phpunit": "^4.8", + "amphp/amp": "^2.3", + "doctrine/coding-standard": "^6.0", + "nyholm/psr7": "^1.2", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "0.12.82", + "phpstan/phpstan-phpunit": "0.12.18", + "phpstan/phpstan-strict-rules": "0.12.9", + "phpunit/phpunit": "^7.2 || ^8.5", "psr/http-message": "^1.0", - "react/promise": "2.*" + "react/promise": "2.*", + "simpod/php-coveralls-mirror": "^3.0" }, "suggest": { "psr/http-message": "To use standard GraphQL server", @@ -27233,9 +27243,15 @@ ], "support": { "issues": "https://github.com/webonyx/graphql-php/issues", - "source": "https://github.com/webonyx/graphql-php/tree/0.12.x" + "source": "https://github.com/webonyx/graphql-php/tree/v14.11.10" }, - "time": "2018-09-02T14:59:54+00:00" + "funding": [ + { + "url": "https://opencollective.com/webonyx-graphql-php", + "type": "open_collective" + } + ], + "time": "2023-07-05T14:23:37+00:00" }, { "name": "weitzman/drupal-test-traits", @@ -27578,6 +27594,57 @@ }, "time": "2022-03-28T14:33:51+00:00" }, + { + "name": "digitalrevolution/php-codesniffer-baseline", + "version": "v1.1.2", + "source": { + "type": "git", + "url": "https://github.com/123inkt/php-codesniffer-baseline.git", + "reference": "00d7cd414cc0fc12e88ee3321d92fe3d2313a9e7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/123inkt/php-codesniffer-baseline/zipball/00d7cd414cc0fc12e88ee3321d92fe3d2313a9e7", + "reference": "00d7cd414cc0fc12e88ee3321d92fe3d2313a9e7", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=7.4", + "squizlabs/php_codesniffer": "^3.6" + }, + "require-dev": { + "composer/composer": "^2.0", + "micheh/phpcs-gitlab": "^1.1", + "mikey179/vfsstream": "1.6.10", + "phpmd/phpmd": "@stable", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^9.5", + "roave/security-advisories": "dev-latest" + }, + "type": "composer-plugin", + "extra": { + "class": "DR\\CodeSnifferBaseline\\Plugin\\Plugin" + }, + "autoload": { + "psr-4": { + "DR\\CodeSnifferBaseline\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Digital Revolution PHP_Codesniffer baseline extension", + "support": { + "issues": "https://github.com/123inkt/php-codesniffer-baseline/issues", + "source": "https://github.com/123inkt/php-codesniffer-baseline/tree/v1.1.2" + }, + "time": "2022-05-31T08:26:56+00:00" + }, { "name": "drupal/html_tag_usage", "version": "1.0.0-beta4", diff --git a/config/sync/language/en/message.template.vet_center_outdated_content.yml b/config/sync/language/en/message.template.vet_center_outdated_content.yml index 38542fadd7..5648c9745d 100644 --- a/config/sync/language/en/message.template.vet_center_outdated_content.yml +++ b/config/sync/language/en/message.template.vet_center_outdated_content.yml @@ -1,4 +1,4 @@ text: - - value: "

VA Directive 6102 requires that VA content is reviewed yearly to ensure information is still relevant. RCS recommends a minimum quarterly review as a best practice. All content will need to be reviewed, and outdated content will need to be edited to remain compliant with VA Directive 6102. Learn more about VA Directive 6102.

\r\n\r\n
\r\n

To assist with getting your content compliant, we are sending you this monthly reminder to log into Drupal, review and update your website content, and attest that your content is up-to-date.

\r\n\r\n

Reviewing your website top to bottom at least quarterly will help you to maintain updated and accurate location and service information and keep the website compliant with VA Directive 6102. For more information, you can read this Knowledge Base article for tips and best practices to manage compliance.

\r\n\r\n

Need help?

\r\n\r\n\r\n\r\n

Please note that before the end of the calendar year a formal suspense will be sent to ensure 100 percent compliance. We encourage you to make use of the resources and tools available before then to ensure your success and the success of information delivery on your page!

\r\n" + value: "

VA Directive 6102 requires that VA content is reviewed yearly to ensure information is still relevant. RCS recommends a minimum quarterly review as a best practice. All content will need to be reviewed, and outdated content will need to be edited to remain compliant with VA Directive 6102. Learn more about VA Directive 6102.

\r\n\r\n
\r\n

To assist with getting your content compliant, we are sending you this monthly reminder to log into Drupal, review and update your website content, and attest that your content is up-to-date.

\r\n\r\n

Reviewing your website top to bottom at least quarterly will help you to maintain updated and accurate location and service information and keep the website compliant with VA Directive 6102. For more information, you can read this Knowledge Base article for tips and best practices to manage compliance.

\r\n\r\n

Need help?

\r\n\r\n\r\n\r\n

Please note that before the end of the calendar year a formal suspense will be sent to ensure 100 percent compliance. We encourage you to make use of the resources and tools available before then to ensure your success and the success of information delivery on your page!

\r\n" format: rich_text diff --git a/config/sync/message.template.vet_center_outdated_content.yml b/config/sync/message.template.vet_center_outdated_content.yml index ee68b85160..da6115c964 100644 --- a/config/sync/message.template.vet_center_outdated_content.yml +++ b/config/sync/message.template.vet_center_outdated_content.yml @@ -9,7 +9,7 @@ label: 'Vet Center Outdated Content' description: 'Email for Vet Center section members, notifying them of outdated content. ' text: - - value: "

VA Directive 6102 requires that VA content is reviewed yearly to ensure information is still relevant. RCS recommends a minimum quarterly review as a best practice. All content will need to be reviewed, and outdated content will need to be edited to remain compliant with VA Directive 6102. Learn more about VA Directive 6102.

\r\n\r\n
\r\n

To assist with getting your content compliant, we are sending you this monthly reminder to log into Drupal, review and update your website content, and attest that your content is up-to-date.

\r\n\r\n

Reviewing your website top to bottom at least quarterly will help you to maintain updated and accurate location and service information and keep the website compliant with VA Directive 6102. For more information, you can read this Knowledge Base article for tips and best practices to manage compliance.

\r\n\r\n

Need help?

\r\n\r\n\r\n\r\n

Please note that before the end of the calendar year a formal suspense will be sent to ensure 100 percent compliance. We encourage you to make use of the resources and tools available before then to ensure your success and the success of information delivery on your page!

\r\n" + value: "

VA Directive 6102 requires that VA content is reviewed yearly to ensure information is still relevant. RCS recommends a minimum quarterly review as a best practice. All content will need to be reviewed, and outdated content will need to be edited to remain compliant with VA Directive 6102. Learn more about VA Directive 6102.

\r\n\r\n
\r\n

To assist with getting your content compliant, we are sending you this monthly reminder to log into Drupal, review and update your website content, and attest that your content is up-to-date.

\r\n\r\n

Reviewing your website top to bottom at least quarterly will help you to maintain updated and accurate location and service information and keep the website compliant with VA Directive 6102. For more information, you can read this Knowledge Base article for tips and best practices to manage compliance.

\r\n\r\n

Need help?

\r\n\r\n\r\n\r\n

Please note that before the end of the calendar year a formal suspense will be sent to ensure 100 percent compliance. We encourage you to make use of the resources and tools available before then to ensure your success and the success of information delivery on your page!

\r\n" format: rich_text settings: 'token options': diff --git a/docroot/modules/custom/va_gov_api/src/Resources/BannerAlerts.php b/docroot/modules/custom/va_gov_api/src/Resources/BannerAlerts.php index 69dbe68f9d..7440f9eb05 100644 --- a/docroot/modules/custom/va_gov_api/src/Resources/BannerAlerts.php +++ b/docroot/modules/custom/va_gov_api/src/Resources/BannerAlerts.php @@ -2,9 +2,6 @@ namespace Drupal\va_gov_api\Resources; -use Drupal\jsonapi\ResourceResponse; -use Drupal\jsonapi_resources\Resource\EntityResourceBase; -use Symfony\Component\HttpFoundation\Request; use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Entity\EntityInterface; @@ -13,8 +10,11 @@ use Drupal\Core\Path\PathValidatorInterface; use Drupal\jsonapi\JsonApiResource\ResourceObject; use Drupal\jsonapi\JsonApiResource\ResourceObjectData; +use Drupal\jsonapi\ResourceResponse; use Drupal\jsonapi\ResourceType\ResourceType; +use Drupal\jsonapi_resources\Resource\EntityResourceBase; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Request; /** * The BannerAlerts JSON:API resource. diff --git a/docroot/modules/custom/va_gov_backend/src/EventSubscriber/EntityEventSubscriber.php b/docroot/modules/custom/va_gov_backend/src/EventSubscriber/EntityEventSubscriber.php index fce02f96da..55f268fcfd 100644 --- a/docroot/modules/custom/va_gov_backend/src/EventSubscriber/EntityEventSubscriber.php +++ b/docroot/modules/custom/va_gov_backend/src/EventSubscriber/EntityEventSubscriber.php @@ -2,13 +2,13 @@ namespace Drupal\va_gov_backend\EventSubscriber; +use Drupal\Core\Config\Entity\ConfigEntityType; +use Drupal\Core\Entity\EntityTypeManager; +use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\core_event_dispatcher\EntityHookEvents; use Drupal\core_event_dispatcher\Event\Entity\EntityPresaveEvent; use Drupal\core_event_dispatcher\Event\Entity\EntityTypeBuildEvent; use Drupal\core_event_dispatcher\Event\Form\FormIdAlterEvent; -use Drupal\Core\Config\Entity\ConfigEntityType; -use Drupal\Core\Entity\EntityTypeManager; -use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\field_event_dispatcher\Event\Field\WidgetSingleElementFormAlterEvent; use Drupal\field_event_dispatcher\FieldHookEvents; use Drupal\node\NodeInterface; diff --git a/docroot/modules/custom/va_gov_backend/src/EventSubscriber/TableAuditViewsEventSubscriber.php b/docroot/modules/custom/va_gov_backend/src/EventSubscriber/TableAuditViewsEventSubscriber.php index d9e5f48c6a..5a88c980f3 100644 --- a/docroot/modules/custom/va_gov_backend/src/EventSubscriber/TableAuditViewsEventSubscriber.php +++ b/docroot/modules/custom/va_gov_backend/src/EventSubscriber/TableAuditViewsEventSubscriber.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_backend\EventSubscriber; -use Drupal\Core\Render\RendererInterface; use Drupal\Core\Link; +use Drupal\Core\Render\RendererInterface; use Drupal\Core\Url; use Drupal\node\NodeInterface; use Drupal\va_gov_backend\Service\VaGovUrlInterface; diff --git a/docroot/modules/custom/va_gov_backend/src/EventSubscriber/ThemeEventSubscriber.php b/docroot/modules/custom/va_gov_backend/src/EventSubscriber/ThemeEventSubscriber.php index 25c7d0a564..d3b8ab3f77 100644 --- a/docroot/modules/custom/va_gov_backend/src/EventSubscriber/ThemeEventSubscriber.php +++ b/docroot/modules/custom/va_gov_backend/src/EventSubscriber/ThemeEventSubscriber.php @@ -3,10 +3,10 @@ namespace Drupal\va_gov_backend\EventSubscriber; use Drupal\Core\Render\Element; -use Drupal\core_event_dispatcher\Event\Theme\ThemeSuggestionsAlterEvent; -use Drupal\core_event_dispatcher\ThemeHookEvents; use Drupal\core_event_dispatcher\Event\Form\FormAlterEvent; +use Drupal\core_event_dispatcher\Event\Theme\ThemeSuggestionsAlterEvent; use Drupal\core_event_dispatcher\FormHookEvents; +use Drupal\core_event_dispatcher\ThemeHookEvents; use Drupal\field_event_dispatcher\Event\Field\WidgetSingleElementFormAlterEvent; use Drupal\field_event_dispatcher\FieldHookEvents; use Drupal\image\Plugin\Field\FieldWidget\ImageWidget; diff --git a/docroot/modules/custom/va_gov_backend/src/Form/ExclusionTypesAdminForm.php b/docroot/modules/custom/va_gov_backend/src/Form/ExclusionTypesAdminForm.php index 7ef9f2271e..f8fc2783e4 100644 --- a/docroot/modules/custom/va_gov_backend/src/Form/ExclusionTypesAdminForm.php +++ b/docroot/modules/custom/va_gov_backend/src/Form/ExclusionTypesAdminForm.php @@ -2,10 +2,10 @@ namespace Drupal\va_gov_backend\Form; -use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Class ExclusionTypesAdminForm. diff --git a/docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventPreviewUrlLinks.php b/docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventPreviewUrlLinks.php new file mode 100644 index 0000000000..0d983eabd9 --- /dev/null +++ b/docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventPreviewUrlLinks.php @@ -0,0 +1,38 @@ +VA.gov` + * + * @Constraint( + * id = "PreventPreviewUrlLinks", + * label = @Translation("Prevent Preview URL Links", context = "Validation"), + * type = { "string_long", "text_long" } + * ) + */ +class PreventPreviewUrlLinks extends Constraint { + + /** + * The error message for plain text fields. + * + * @var string + * @see \Drupal\va_gov_backend\Plugin\Validation\Constraint\PreventPreviewUrlLinksValidator + */ + public $plainTextMessage = 'Replace the preview URL ":url" with a public URL.'; + + /** + * The error message for rich text fields. + * + * @var string + * @see \Drupal\va_gov_backend\Plugin\Validation\Constraint\PreventPreviewUrlLinksValidator + */ + public $richTextMessage = 'Review the linked text ":link" (:url) and replace the preview URL with a public URL.'; + +} diff --git a/docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventPreviewUrlLinksValidator.php b/docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventPreviewUrlLinksValidator.php new file mode 100644 index 0000000000..4c23281806 --- /dev/null +++ b/docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventPreviewUrlLinksValidator.php @@ -0,0 +1,74 @@ +addViolation($delta, $constraint->plainTextMessage, [ + ':url' => $matches[1], + ]); + } + } + + /** + * {@inheritdoc} + */ + public function validateHtml(string $html, Constraint $constraint, int $delta) { + /** @var \Drupal\va_gov_backend\Plugin\Validation\Constraint\PreventPreviewUrlLinks $constraint */ + $dom = Html::load($html); + $xpath = new \DOMXPath($dom); + foreach ($xpath->query('//a[contains(@href, "preview-staging.vfs.va.gov") or contains(@href, "preview-prod.vfs.va.gov")]') as $element) { + // Ignore non-element nodes. + if (!($element instanceof \DOMElement)) { + continue; + } + $url = $element->getAttribute('href'); + $firstChild = $element->hasChildNodes() ? $element->childNodes[0] : NULL; + $link = $element->ownerDocument->saveHTML($firstChild ?? $element); + $this->getContext() + ->buildViolation($constraint->richTextMessage, [ + ':link' => $link, + ':url' => $url, + ]) + ->atPath((string) $delta . '.value') + ->addViolation(); + return; + } + } + +} diff --git a/docroot/modules/custom/va_gov_backend/src/Plugin/field_group/FieldGroupFormatter/Tooltip.php b/docroot/modules/custom/va_gov_backend/src/Plugin/field_group/FieldGroupFormatter/Tooltip.php index 3a79cfcf37..4473f06d3c 100644 --- a/docroot/modules/custom/va_gov_backend/src/Plugin/field_group/FieldGroupFormatter/Tooltip.php +++ b/docroot/modules/custom/va_gov_backend/src/Plugin/field_group/FieldGroupFormatter/Tooltip.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_backend\Plugin\field_group\FieldGroupFormatter; -use Drupal\field_group\Plugin\field_group\FieldGroupFormatter\HtmlElement; use Drupal\Component\Utility\Html; +use Drupal\field_group\Plugin\field_group\FieldGroupFormatter\HtmlElement; /** * Tooltip field group formatter. diff --git a/docroot/modules/custom/va_gov_backend/src/Plugin/views/access/PdfAuditAccess.php b/docroot/modules/custom/va_gov_backend/src/Plugin/views/access/PdfAuditAccess.php index b6706e8b42..8b17963f8c 100644 --- a/docroot/modules/custom/va_gov_backend/src/Plugin/views/access/PdfAuditAccess.php +++ b/docroot/modules/custom/va_gov_backend/src/Plugin/views/access/PdfAuditAccess.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_backend\Plugin\views\access; -use Drupal\views\Plugin\views\access\AccessPluginBase; use Drupal\Core\Session\AccountInterface; +use Drupal\views\Plugin\views\access\AccessPluginBase; use Symfony\Component\Routing\Route; /** diff --git a/docroot/modules/custom/va_gov_backend/va_gov_backend.module b/docroot/modules/custom/va_gov_backend/va_gov_backend.module index 4620f913cd..b98edea58c 100644 --- a/docroot/modules/custom/va_gov_backend/va_gov_backend.module +++ b/docroot/modules/custom/va_gov_backend/va_gov_backend.module @@ -1323,6 +1323,7 @@ function va_gov_backend_entity_bundle_field_info_alter(&$fields, EntityTypeInter $field->addConstraint('PreventAbsoluteUrlsAsPathsInLinks'); $field->addConstraint('PreventVaGovDomainsAsPathsInLinks'); $field->addConstraint('PreventDomainsAsPathsInLinks'); + $field->addConstraint('PreventPreviewUrlLinks'); } elseif ($field->getType() === 'text_long') { $field->addConstraint('PreventAbsoluteCmsLinks'); @@ -1332,6 +1333,7 @@ function va_gov_backend_entity_bundle_field_info_alter(&$fields, EntityTypeInter $field->addConstraint('PreventAbsoluteUrlsAsPathsInLinks'); $field->addConstraint('PreventVaGovDomainsAsPathsInLinks'); $field->addConstraint('PreventDomainsAsPathsInLinks'); + $field->addConstraint('PreventPreviewUrlLinks'); } } // Add paragraph checks on clp panels. diff --git a/docroot/modules/custom/va_gov_banner/src/Plugin/Validation/Constraint/RequireScopeValidator.php b/docroot/modules/custom/va_gov_banner/src/Plugin/Validation/Constraint/RequireScopeValidator.php index 12838b8b89..89cf9b9018 100644 --- a/docroot/modules/custom/va_gov_banner/src/Plugin/Validation/Constraint/RequireScopeValidator.php +++ b/docroot/modules/custom/va_gov_banner/src/Plugin/Validation/Constraint/RequireScopeValidator.php @@ -4,9 +4,9 @@ use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\va_gov_user\Service\UserPermsService; +use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\DependencyInjection\ContainerInterface; /** * Validates the RequireScope constraint. diff --git a/docroot/modules/custom/va_gov_build_trigger/src/Commands/SiteStatusCommands.php b/docroot/modules/custom/va_gov_build_trigger/src/Commands/SiteStatusCommands.php index 6418ec1bf0..64dd3fbe8a 100644 --- a/docroot/modules/custom/va_gov_build_trigger/src/Commands/SiteStatusCommands.php +++ b/docroot/modules/custom/va_gov_build_trigger/src/Commands/SiteStatusCommands.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_build_trigger\Commands; -use Drush\Commands\DrushCommands; use Drupal\va_gov_build_trigger\SiteStatus\SiteStatusInterface; +use Drush\Commands\DrushCommands; /** * A Drush interface to the Site Status service. diff --git a/docroot/modules/custom/va_gov_build_trigger/src/Controller/ContentReleaseNotificationController.php b/docroot/modules/custom/va_gov_build_trigger/src/Controller/ContentReleaseNotificationController.php index ccaa1a905c..944dd63a9b 100644 --- a/docroot/modules/custom/va_gov_build_trigger/src/Controller/ContentReleaseNotificationController.php +++ b/docroot/modules/custom/va_gov_build_trigger/src/Controller/ContentReleaseNotificationController.php @@ -3,10 +3,10 @@ namespace Drupal\va_gov_build_trigger\Controller; use Drupal\Core\Controller\ControllerBase; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\HttpFoundation\Response; use Drupal\va_gov_build_trigger\Service\ReleaseStateManager; use Drupal\va_gov_build_trigger\Service\ReleaseStateManagerInterface; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\Response; /** * Handles content release notifications. diff --git a/docroot/modules/custom/va_gov_build_trigger/src/EventSubscriber/ContentReleaseIntervalSubscriber.php b/docroot/modules/custom/va_gov_build_trigger/src/EventSubscriber/ContentReleaseIntervalSubscriber.php index d327a291ad..f771d3faf3 100644 --- a/docroot/modules/custom/va_gov_build_trigger/src/EventSubscriber/ContentReleaseIntervalSubscriber.php +++ b/docroot/modules/custom/va_gov_build_trigger/src/EventSubscriber/ContentReleaseIntervalSubscriber.php @@ -4,8 +4,8 @@ use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\State\StateInterface; -use Drupal\va_gov_build_trigger\Plugin\MetricsCollector\ContentReleaseInterval; use Drupal\va_gov_build_trigger\Event\ReleaseStateTransitionEvent; +use Drupal\va_gov_build_trigger\Plugin\MetricsCollector\ContentReleaseInterval; use Drupal\va_gov_build_trigger\Service\ReleaseStateManager; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/docroot/modules/custom/va_gov_build_trigger/src/Form/PreviewForm.php b/docroot/modules/custom/va_gov_build_trigger/src/Form/PreviewForm.php index d7898f2ec7..4822d38c16 100644 --- a/docroot/modules/custom/va_gov_build_trigger/src/Form/PreviewForm.php +++ b/docroot/modules/custom/va_gov_build_trigger/src/Form/PreviewForm.php @@ -2,10 +2,10 @@ namespace Drupal\va_gov_build_trigger\Form; -use Drupal\Core\Form\FormBase; -use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\OpenModalDialogCommand; +use Drupal\Core\Form\FormBase; +use Drupal\Core\Form\FormStateInterface; use Drupal\node\NodeInterface; /** diff --git a/docroot/modules/custom/va_gov_build_trigger/src/Plugin/AdvancedQueue/JobType/ReleaseDispatch.php b/docroot/modules/custom/va_gov_build_trigger/src/Plugin/AdvancedQueue/JobType/ReleaseDispatch.php index 4822159f31..eb9ccb5832 100644 --- a/docroot/modules/custom/va_gov_build_trigger/src/Plugin/AdvancedQueue/JobType/ReleaseDispatch.php +++ b/docroot/modules/custom/va_gov_build_trigger/src/Plugin/AdvancedQueue/JobType/ReleaseDispatch.php @@ -8,10 +8,10 @@ use Drupal\Core\Logger\LoggerChannelFactoryInterface; use Drupal\Core\Logger\LoggerChannelTrait; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; +use Drupal\va_gov_build_trigger\Environment\EnvironmentDiscovery; use Drupal\va_gov_build_trigger\Service\ReleaseStateManager; use Drupal\va_gov_build_trigger\Service\ReleaseStateManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\va_gov_build_trigger\Environment\EnvironmentDiscovery; /** * AdvancedQueue queue processor plugin for content release dispatch. diff --git a/docroot/modules/custom/va_gov_build_trigger/src/Plugin/MetricsCollector/TimeSinceLastContentRelease.php b/docroot/modules/custom/va_gov_build_trigger/src/Plugin/MetricsCollector/TimeSinceLastContentRelease.php index 32c958edde..f27fcd5cf4 100644 --- a/docroot/modules/custom/va_gov_build_trigger/src/Plugin/MetricsCollector/TimeSinceLastContentRelease.php +++ b/docroot/modules/custom/va_gov_build_trigger/src/Plugin/MetricsCollector/TimeSinceLastContentRelease.php @@ -3,8 +3,8 @@ namespace Drupal\va_gov_build_trigger\Plugin\MetricsCollector; use Drupal\Component\Datetime\TimeInterface; -use Drupal\va_gov_build_trigger\Service\ReleaseStateManager; use Drupal\Core\State\StateInterface; +use Drupal\va_gov_build_trigger\Service\ReleaseStateManager; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/docroot/modules/custom/va_gov_build_trigger/src/Plugin/MetricsCollector/TimeSinceLastContentReleaseError.php b/docroot/modules/custom/va_gov_build_trigger/src/Plugin/MetricsCollector/TimeSinceLastContentReleaseError.php index 62cdb96ed7..7fa7311415 100644 --- a/docroot/modules/custom/va_gov_build_trigger/src/Plugin/MetricsCollector/TimeSinceLastContentReleaseError.php +++ b/docroot/modules/custom/va_gov_build_trigger/src/Plugin/MetricsCollector/TimeSinceLastContentReleaseError.php @@ -3,8 +3,8 @@ namespace Drupal\va_gov_build_trigger\Plugin\MetricsCollector; use Drupal\Component\Datetime\TimeInterface; -use Drupal\va_gov_build_trigger\Service\ReleaseStateManager; use Drupal\Core\State\StateInterface; +use Drupal\va_gov_build_trigger\Service\ReleaseStateManager; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/docroot/modules/custom/va_gov_bulk/src/Service/ModerationActions.php b/docroot/modules/custom/va_gov_bulk/src/Service/ModerationActions.php index 3bcb638f01..4b8a222202 100644 --- a/docroot/modules/custom/va_gov_bulk/src/Service/ModerationActions.php +++ b/docroot/modules/custom/va_gov_bulk/src/Service/ModerationActions.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_bulk\Service; -use Drupal\Core\Session\AccountProxyInterface; use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\Core\Session\AccountProxyInterface; use Drupal\node\NodeInterface; /** diff --git a/docroot/modules/custom/va_gov_clone/src/CloneEntityFinder/CloneEntityFinderDiscovery.php b/docroot/modules/custom/va_gov_clone/src/CloneEntityFinder/CloneEntityFinderDiscovery.php index 242a232ba9..d51d834042 100644 --- a/docroot/modules/custom/va_gov_clone/src/CloneEntityFinder/CloneEntityFinderDiscovery.php +++ b/docroot/modules/custom/va_gov_clone/src/CloneEntityFinder/CloneEntityFinderDiscovery.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_clone\CloneEntityFinder; -use Drupal\Core\Plugin\DefaultPluginManager; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Extension\ModuleHandlerInterface; +use Drupal\Core\Plugin\DefaultPluginManager; /** * Provides the Clone handler plugin manager. diff --git a/docroot/modules/custom/va_gov_clone/src/CloneManager.php b/docroot/modules/custom/va_gov_clone/src/CloneManager.php index d02afe6899..76ba3e45cf 100644 --- a/docroot/modules/custom/va_gov_clone/src/CloneManager.php +++ b/docroot/modules/custom/va_gov_clone/src/CloneManager.php @@ -2,12 +2,12 @@ namespace Drupal\va_gov_clone; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\entity_clone\Event\EntityCloneEvent; use Drupal\entity_clone\Event\EntityCloneEvents; use Drupal\va_gov_clone\CloneEntityFinder\CloneEntityFinderDiscovery; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * The Clone Manager to clone content. diff --git a/docroot/modules/custom/va_gov_content_release/src/Controller/FrontendVersionAutocompleteController.php b/docroot/modules/custom/va_gov_content_release/src/Controller/FrontendVersionAutocompleteController.php index dee748c71c..a0398b8f13 100644 --- a/docroot/modules/custom/va_gov_content_release/src/Controller/FrontendVersionAutocompleteController.php +++ b/docroot/modules/custom/va_gov_content_release/src/Controller/FrontendVersionAutocompleteController.php @@ -69,12 +69,12 @@ public function handleAutocomplete(Request $request, string $frontend, int $coun $frontend = Frontend::from($frontend); } catch (\InvalidArgumentException $e) { - return JsonResponse::create(['error' => 'Invalid frontend type provided.']); + return new JsonResponse(['error' => 'Invalid frontend type provided.']); } $input = $request->query->get('q') ?? 'main'; $query = mb_strtolower($input); $results = $this->frontendVersionSearch->getMatchingReferences($frontend, $query, $count); - return JsonResponse::create($results); + return new JsonResponse($results); } } diff --git a/docroot/modules/custom/va_gov_content_release/src/EntityEvent/Strategy/Resolver/Resolver.php b/docroot/modules/custom/va_gov_content_release/src/EntityEvent/Strategy/Resolver/Resolver.php index 056e38afaa..18fc10cdaa 100644 --- a/docroot/modules/custom/va_gov_content_release/src/EntityEvent/Strategy/Resolver/Resolver.php +++ b/docroot/modules/custom/va_gov_content_release/src/EntityEvent/Strategy/Resolver/Resolver.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_content_release\EntityEvent\Strategy\Resolver; -use Drupal\va_gov_environment\Discovery\DiscoveryInterface; use Drupal\va_gov_content_release\Exception\CouldNotDetermineStrategyException; +use Drupal\va_gov_environment\Discovery\DiscoveryInterface; /** * The strategy resolver service. diff --git a/docroot/modules/custom/va_gov_content_release/src/Form/Resolver/Resolver.php b/docroot/modules/custom/va_gov_content_release/src/Form/Resolver/Resolver.php index 52f8a0cd2f..81d0c4f737 100644 --- a/docroot/modules/custom/va_gov_content_release/src/Form/Resolver/Resolver.php +++ b/docroot/modules/custom/va_gov_content_release/src/Form/Resolver/Resolver.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_content_release\Form\Resolver; +use Drupal\va_gov_content_release\Exception\CouldNotDetermineFormException; use Drupal\va_gov_content_release\Form\GitForm; use Drupal\va_gov_content_release\Form\SimpleForm; -use Drupal\va_gov_content_release\Exception\CouldNotDetermineFormException; use Drupal\va_gov_environment\Discovery\DiscoveryInterface; /** diff --git a/docroot/modules/custom/va_gov_content_release/src/GitHub/GitHubRepositoryDispatch.php b/docroot/modules/custom/va_gov_content_release/src/GitHub/GitHubRepositoryDispatch.php index 8c4e0a9fae..56fff71f08 100644 --- a/docroot/modules/custom/va_gov_content_release/src/GitHub/GitHubRepositoryDispatch.php +++ b/docroot/modules/custom/va_gov_content_release/src/GitHub/GitHubRepositoryDispatch.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_content_release\GitHub; -use Drupal\va_gov_github\Api\Client\ApiClientInterface; use Drupal\va_gov_content_release\Exception\ContentReleaseInProgressException; use Drupal\va_gov_content_release\Exception\GitHubRepositoryDispatchException; +use Drupal\va_gov_github\Api\Client\ApiClientInterface; /** * The GitHub repository dispatch service. diff --git a/docroot/modules/custom/va_gov_content_release/src/LocalFilesystem/LocalFilesystemBuildFile.php b/docroot/modules/custom/va_gov_content_release/src/LocalFilesystem/LocalFilesystemBuildFile.php index adb93a2eab..e597910b4c 100644 --- a/docroot/modules/custom/va_gov_content_release/src/LocalFilesystem/LocalFilesystemBuildFile.php +++ b/docroot/modules/custom/va_gov_content_release/src/LocalFilesystem/LocalFilesystemBuildFile.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_content_release\LocalFilesystem; -use Drupal\Core\File\FileSystemInterface; use Drupal\Core\File\Exception\FileException; +use Drupal\Core\File\FileSystemInterface; use Drupal\va_gov_content_release\Exception\StrategyErrorException; /** diff --git a/docroot/modules/custom/va_gov_content_release/src/Plugin/EntityEventStrategy/ExceptionTest.php b/docroot/modules/custom/va_gov_content_release/src/Plugin/EntityEventStrategy/ExceptionTest.php index 106fb8eb29..febaca13c1 100644 --- a/docroot/modules/custom/va_gov_content_release/src/Plugin/EntityEventStrategy/ExceptionTest.php +++ b/docroot/modules/custom/va_gov_content_release/src/Plugin/EntityEventStrategy/ExceptionTest.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_content_release\Plugin\EntityEventStrategy; -use Drupal\va_gov_content_release\Exception\StrategyErrorException; use Drupal\va_gov_content_release\EntityEvent\Strategy\Plugin\StrategyPluginBase; +use Drupal\va_gov_content_release\Exception\StrategyErrorException; use Drupal\va_gov_content_types\Entity\VaNodeInterface; /** diff --git a/docroot/modules/custom/va_gov_content_release/src/Request/Request.php b/docroot/modules/custom/va_gov_content_release/src/Request/Request.php index 21cfa1955f..50df919898 100644 --- a/docroot/modules/custom/va_gov_content_release/src/Request/Request.php +++ b/docroot/modules/custom/va_gov_content_release/src/Request/Request.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_content_release\Request; -use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\advancedqueue\Job; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\va_gov_content_release\Exception\RequestException; /** diff --git a/docroot/modules/custom/va_gov_events/src/Form/SmartDateOverrideForm.php b/docroot/modules/custom/va_gov_events/src/Form/SmartDateOverrideForm.php index c4484cd920..078c43a646 100644 --- a/docroot/modules/custom/va_gov_events/src/Form/SmartDateOverrideForm.php +++ b/docroot/modules/custom/va_gov_events/src/Form/SmartDateOverrideForm.php @@ -15,8 +15,8 @@ use Drupal\Core\Url; use Drupal\field\Entity\FieldConfig; use Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateWidgetBase; -use Drupal\va_gov_events\Controller\Instances; use Drupal\smart_date_recur\Entity\SmartDateOverride; +use Drupal\va_gov_events\Controller\Instances; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/docroot/modules/custom/va_gov_flags/src/Controller/VaGovFlagsController.php b/docroot/modules/custom/va_gov_flags/src/Controller/VaGovFlagsController.php index a622536962..92eec6d90e 100644 --- a/docroot/modules/custom/va_gov_flags/src/Controller/VaGovFlagsController.php +++ b/docroot/modules/custom/va_gov_flags/src/Controller/VaGovFlagsController.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_flags\Controller; -use Drupal\va_gov_flags\FeatureFlagDataBuilder; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; +use Drupal\va_gov_flags\FeatureFlagDataBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\JsonResponse; diff --git a/docroot/modules/custom/va_gov_git/src/BranchSearch/BranchSearch.php b/docroot/modules/custom/va_gov_git/src/BranchSearch/BranchSearch.php index 6432254b77..a6ed932caa 100644 --- a/docroot/modules/custom/va_gov_git/src/BranchSearch/BranchSearch.php +++ b/docroot/modules/custom/va_gov_git/src/BranchSearch/BranchSearch.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_git\BranchSearch; -use Drupal\va_gov_git\Repository\RepositoryInterface; use Drupal\Core\Logger\LoggerChannelFactoryInterface; +use Drupal\va_gov_git\Repository\RepositoryInterface; /** * The branch search service. diff --git a/docroot/modules/custom/va_gov_git/src/Commands/RepositoryCommands.php b/docroot/modules/custom/va_gov_git/src/Commands/RepositoryCommands.php index f5dc27417d..f1a1298123 100644 --- a/docroot/modules/custom/va_gov_git/src/Commands/RepositoryCommands.php +++ b/docroot/modules/custom/va_gov_git/src/Commands/RepositoryCommands.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_git\Commands; -use Drupal\va_gov_git\BranchSearch\Factory\BranchSearchFactoryInterface; use Drupal\va_gov_git\BranchSearch\BranchSearchInterface; +use Drupal\va_gov_git\BranchSearch\Factory\BranchSearchFactoryInterface; use Drupal\va_gov_git\Repository\Factory\RepositoryFactoryInterface; use Drupal\va_gov_git\Repository\RepositoryInterface; use Drush\Commands\DrushCommands; diff --git a/docroot/modules/custom/va_gov_github/src/Commands/ApiClientCommands.php b/docroot/modules/custom/va_gov_github/src/Commands/ApiClientCommands.php index ff574ebf07..8fb94eb6b3 100644 --- a/docroot/modules/custom/va_gov_github/src/Commands/ApiClientCommands.php +++ b/docroot/modules/custom/va_gov_github/src/Commands/ApiClientCommands.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_github\Commands; -use Drupal\va_gov_github\Api\Client\Factory\ApiClientFactoryInterface; use Drupal\va_gov_github\Api\Client\ApiClientInterface; +use Drupal\va_gov_github\Api\Client\Factory\ApiClientFactoryInterface; use Drush\Commands\DrushCommands; /** diff --git a/docroot/modules/custom/va_gov_lovell/src/EventSubscriber/LovellEventSubscriber.php b/docroot/modules/custom/va_gov_lovell/src/EventSubscriber/LovellEventSubscriber.php index 26c38de5b8..4fd666842a 100644 --- a/docroot/modules/custom/va_gov_lovell/src/EventSubscriber/LovellEventSubscriber.php +++ b/docroot/modules/custom/va_gov_lovell/src/EventSubscriber/LovellEventSubscriber.php @@ -2,12 +2,6 @@ namespace Drupal\va_gov_lovell\EventSubscriber; -use Drupal\core_event_dispatcher\EntityHookEvents; -use Drupal\core_event_dispatcher\Event\Entity\EntityAccessEvent; -use Drupal\core_event_dispatcher\Event\Entity\EntityInsertEvent; -use Drupal\core_event_dispatcher\Event\Entity\EntityPresaveEvent; -use Drupal\core_event_dispatcher\Event\Entity\EntityUpdateEvent; -use Drupal\core_event_dispatcher\Event\Form\FormIdAlterEvent; use Drupal\Core\Access\AccessResult; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeManager; @@ -15,6 +9,12 @@ use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\core_event_dispatcher\EntityHookEvents; +use Drupal\core_event_dispatcher\Event\Entity\EntityAccessEvent; +use Drupal\core_event_dispatcher\Event\Entity\EntityInsertEvent; +use Drupal\core_event_dispatcher\Event\Entity\EntityPresaveEvent; +use Drupal\core_event_dispatcher\Event\Entity\EntityUpdateEvent; +use Drupal\core_event_dispatcher\Event\Form\FormIdAlterEvent; use Drupal\menu_link_content\MenuLinkContentInterface; use Drupal\node\NodeInterface; use Drupal\path_alias\Entity\PathAlias; diff --git a/docroot/modules/custom/va_gov_lovell/src/Variables/BreadcrumbEventVariables.php b/docroot/modules/custom/va_gov_lovell/src/Variables/BreadcrumbEventVariables.php index e8837f183b..71dd07770d 100644 --- a/docroot/modules/custom/va_gov_lovell/src/Variables/BreadcrumbEventVariables.php +++ b/docroot/modules/custom/va_gov_lovell/src/Variables/BreadcrumbEventVariables.php @@ -2,9 +2,8 @@ namespace Drupal\va_gov_lovell\Variables; -use Drupal\preprocess_event_dispatcher\Variables\AbstractEventVariables; - use Drupal\Core\Entity\EntityInterface; +use Drupal\preprocess_event_dispatcher\Variables\AbstractEventVariables; /** * Wrapper class for breadcrumb preprocess event variables. diff --git a/docroot/modules/custom/va_gov_menu_access/src/Access/RouteAccessChecks.php b/docroot/modules/custom/va_gov_menu_access/src/Access/RouteAccessChecks.php index b561dfe355..99cc9c4064 100644 --- a/docroot/modules/custom/va_gov_menu_access/src/Access/RouteAccessChecks.php +++ b/docroot/modules/custom/va_gov_menu_access/src/Access/RouteAccessChecks.php @@ -3,13 +3,13 @@ namespace Drupal\va_gov_menu_access\Access; use Drupal\Core\Access\AccessResult; +use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Routing\Access\AccessInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Session\AccountInterface; use Drupal\va_gov_user\Service\UserPermsService; -use Symfony\Component\Routing\Route; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\DependencyInjection\ContainerInjectionInterface; +use Symfony\Component\Routing\Route; /** * Determines access rules for particular routes. diff --git a/docroot/modules/custom/va_gov_menu_access/src/Service/MenuReductionService.php b/docroot/modules/custom/va_gov_menu_access/src/Service/MenuReductionService.php index e3f477b4c0..4e23518c84 100644 --- a/docroot/modules/custom/va_gov_menu_access/src/Service/MenuReductionService.php +++ b/docroot/modules/custom/va_gov_menu_access/src/Service/MenuReductionService.php @@ -8,8 +8,8 @@ use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\node\NodeForm; use Drupal\path_alias\AliasManagerInterface; -use Drupal\va_gov_user\Service\UserPermsService; use Drupal\va_gov_lovell\LovellOps; +use Drupal\va_gov_user\Service\UserPermsService; /** * Class MenuReductionService a service for reducing possible menu items. diff --git a/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/MessageLogger.php b/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/MessageLogger.php index 5ad46ae3a5..45bf273a87 100644 --- a/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/MessageLogger.php +++ b/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/MessageLogger.php @@ -2,12 +2,12 @@ namespace Drupal\va_gov_migrate\EventSubscriber; +use Drupal\Core\File\FileUrlGeneratorInterface; +use Drupal\Core\State\StateInterface; use Drupal\migrate\Event\MigrateEvents; use Drupal\migrate\Event\MigrateImportEvent; use Drupal\migration_tools\Event\MessageEvent; use Drupal\migration_tools\Message; -use Drupal\Core\File\FileUrlGeneratorInterface; -use Drupal\Core\State\StateInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** diff --git a/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/PostRowSave.php b/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/PostRowSave.php index 08cd9d38ea..ae652b58bf 100644 --- a/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/PostRowSave.php +++ b/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/PostRowSave.php @@ -3,12 +3,12 @@ namespace Drupal\va_gov_migrate\EventSubscriber; use Drupal\menu_link_content\Entity\MenuLinkContent; -use Drupal\migration_tools\Message; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Drupal\va_gov_migrate\ParagraphMigrator; -use Drupal\migrate\Event\MigratePostRowSaveEvent; use Drupal\migrate\Event\MigrateEvents; +use Drupal\migrate\Event\MigratePostRowSaveEvent; +use Drupal\migration_tools\Message; use Drupal\node\Entity\Node; +use Drupal\va_gov_migrate\ParagraphMigrator; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * Add paragraphs to node after save. diff --git a/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/PrepareRow.php b/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/PrepareRow.php index 117d5427ab..1cd47238f4 100644 --- a/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/PrepareRow.php +++ b/docroot/modules/custom/va_gov_migrate/src/EventSubscriber/PrepareRow.php @@ -3,9 +3,9 @@ namespace Drupal\va_gov_migrate\EventSubscriber; use Drupal\migrate\MigrateSkipRowException; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Drupal\migrate_plus\Event\MigratePrepareRowEvent; use Drupal\migrate_plus\Event\MigrateEvents; +use Drupal\migrate_plus\Event\MigratePrepareRowEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * Add paragraphs to node after save. diff --git a/docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanel.php b/docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanel.php index 3a4b4bb20e..4538ac1304 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanel.php +++ b/docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanel.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_migrate\Paragraph; +use Drupal\migration_tools\Message; use Drupal\va_gov_migrate\ParagraphType; use QueryPath\DOMQuery; -use Drupal\migration_tools\Message; /** * Starred Horizontal Rule paragraph type. diff --git a/docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanelItem.php b/docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanelItem.php index 868f23b4c0..5b1b0e3a7c 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanelItem.php +++ b/docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanelItem.php @@ -2,10 +2,10 @@ namespace Drupal\va_gov_migrate\Paragraph; +use Drupal\migration_tools\Message; use Drupal\paragraphs\Entity\Paragraph; use Drupal\va_gov_migrate\ParagraphType; use QueryPath\DOMQuery; -use Drupal\migration_tools\Message; /** * Starred Horizontal Rule paragraph type. diff --git a/docroot/modules/custom/va_gov_migrate/src/Paragraph/LinksListItem.php b/docroot/modules/custom/va_gov_migrate/src/Paragraph/LinksListItem.php index bc4d2004d9..c276248b78 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Paragraph/LinksListItem.php +++ b/docroot/modules/custom/va_gov_migrate/src/Paragraph/LinksListItem.php @@ -2,10 +2,10 @@ namespace Drupal\va_gov_migrate\Paragraph; -use Drupal\va_gov_migrate\ParagraphType; -use QueryPath\DOMQuery; use Drupal\migration_tools\Message; use Drupal\migration_tools\StringTools; +use Drupal\va_gov_migrate\ParagraphType; +use QueryPath\DOMQuery; /** * Link list item paragraph type. diff --git a/docroot/modules/custom/va_gov_migrate/src/Paragraph/NumberCallout.php b/docroot/modules/custom/va_gov_migrate/src/Paragraph/NumberCallout.php index bee7de3d3a..94abc6e2ad 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Paragraph/NumberCallout.php +++ b/docroot/modules/custom/va_gov_migrate/src/Paragraph/NumberCallout.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_migrate\Paragraph; +use Drupal\migration_tools\Message; use Drupal\va_gov_migrate\ParagraphType; use QueryPath\DOMQuery; -use Drupal\migration_tools\Message; /** * NumberCallout paragraph migration. diff --git a/docroot/modules/custom/va_gov_migrate/src/Paragraph/Process.php b/docroot/modules/custom/va_gov_migrate/src/Paragraph/Process.php index aee73256ef..15da2f0eee 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Paragraph/Process.php +++ b/docroot/modules/custom/va_gov_migrate/src/Paragraph/Process.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_migrate\Paragraph; +use Drupal\migration_tools\Message; use Drupal\va_gov_migrate\ParagraphType; use QueryPath\DOMQuery; -use Drupal\migration_tools\Message; /** * Process paragraph type. diff --git a/docroot/modules/custom/va_gov_migrate/src/Paragraph/QAAccordion.php b/docroot/modules/custom/va_gov_migrate/src/Paragraph/QAAccordion.php index 31eaf1cda2..ac06cc4c37 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Paragraph/QAAccordion.php +++ b/docroot/modules/custom/va_gov_migrate/src/Paragraph/QAAccordion.php @@ -2,11 +2,11 @@ namespace Drupal\va_gov_migrate\Paragraph; +use Drupal\migration_tools\Message; use Drupal\paragraphs\Entity\Paragraph; use Drupal\va_gov_migrate\AnomalyMessage; use Drupal\va_gov_migrate\Paragraph\Base\QABase; use QueryPath\DOMQuery; -use Drupal\migration_tools\Message; /** * For converting accordions to Q&A paragraphs. diff --git a/docroot/modules/custom/va_gov_migrate/src/Paragraph/QASchema.php b/docroot/modules/custom/va_gov_migrate/src/Paragraph/QASchema.php index 16ac45ec11..21e66b7eb8 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Paragraph/QASchema.php +++ b/docroot/modules/custom/va_gov_migrate/src/Paragraph/QASchema.php @@ -2,10 +2,10 @@ namespace Drupal\va_gov_migrate\Paragraph; +use Drupal\migration_tools\Message; use Drupal\paragraphs\Entity\Paragraph; use Drupal\va_gov_migrate\Paragraph\Base\QABase; use QueryPath\DOMQuery; -use Drupal\migration_tools\Message; /** * Q&A Paragraph type. diff --git a/docroot/modules/custom/va_gov_migrate/src/Paragraph/ReactWidget.php b/docroot/modules/custom/va_gov_migrate/src/Paragraph/ReactWidget.php index 06e96dec56..06d0a5552d 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Paragraph/ReactWidget.php +++ b/docroot/modules/custom/va_gov_migrate/src/Paragraph/ReactWidget.php @@ -2,10 +2,10 @@ namespace Drupal\va_gov_migrate\Paragraph; +use Drupal\migration_tools\Message; use Drupal\va_gov_migrate\AnomalyMessage; use Drupal\va_gov_migrate\ParagraphType; use QueryPath\DOMQuery; -use Drupal\migration_tools\Message; /** * Migration for ReactWidget paragraphs. diff --git a/docroot/modules/custom/va_gov_migrate/src/ParagraphMigrator.php b/docroot/modules/custom/va_gov_migrate/src/ParagraphMigrator.php index db58529c77..895018d398 100644 --- a/docroot/modules/custom/va_gov_migrate/src/ParagraphMigrator.php +++ b/docroot/modules/custom/va_gov_migrate/src/ParagraphMigrator.php @@ -5,9 +5,9 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\migrate\Event\MigratePostRowSaveEvent; use Drupal\migrate\MigrateException; +use Drupal\migration_tools\Message; use Drupal\paragraphs\Entity\Paragraph; use QueryPath\DOMQuery; -use Drupal\migration_tools\Message; /** * ParagraphMigrator migrates paragraphs from query path. diff --git a/docroot/modules/custom/va_gov_migrate/src/ParagraphType.php b/docroot/modules/custom/va_gov_migrate/src/ParagraphType.php index e1d0b88ee6..d99572b8ad 100644 --- a/docroot/modules/custom/va_gov_migrate/src/ParagraphType.php +++ b/docroot/modules/custom/va_gov_migrate/src/ParagraphType.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_migrate; -use Drupal\paragraphs\Entity\Paragraph; use Drupal\Core\Entity\EntityInterface; use Drupal\migration_tools\Message; +use Drupal\paragraphs\Entity\Paragraph; use QueryPath\DOMQuery; /** diff --git a/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/process/VAFieldOfficeHours.php b/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/process/VAFieldOfficeHours.php index 10e4488f3a..b539f06df1 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/process/VAFieldOfficeHours.php +++ b/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/process/VAFieldOfficeHours.php @@ -2,8 +2,8 @@ namespace Drupal\va_gov_migrate\Plugin\migrate\process; -use Drupal\migrate\ProcessPluginBase; use Drupal\migrate\MigrateExecutableInterface; +use Drupal\migrate\ProcessPluginBase; use Drupal\migrate\Row; /** diff --git a/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/AlertBlockSource.php b/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/AlertBlockSource.php index b1c6d5a2db..e292a9d7ea 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/AlertBlockSource.php +++ b/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/AlertBlockSource.php @@ -2,12 +2,12 @@ namespace Drupal\va_gov_migrate\Plugin\migrate\source; +use Drupal\migrate\MigrateException; use Drupal\migration_tools\Message; -use QueryPath\DOMQuery; -use Drupal\migration_tools\StringTools; use Drupal\migration_tools\Obtainer\ObtainHtml; +use Drupal\migration_tools\StringTools; use Michelf\MarkdownExtra; -use Drupal\migrate\MigrateException; +use QueryPath\DOMQuery; /** * Gets blocks from pages referenced by metalsmith files. diff --git a/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/MetalsmithSource.php b/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/MetalsmithSource.php index d37604f6e3..629639c1bd 100644 --- a/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/MetalsmithSource.php +++ b/docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/MetalsmithSource.php @@ -4,14 +4,14 @@ use Drupal\Core\Site\Settings; use Drupal\migrate\MigrateException; +use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migration_tools\Message; use Drupal\migration_tools\Plugin\migrate\source\UrlList; use Drupal\migration_tools\StringTools; use Drupal\va_gov_migrate\AnomalyMessage; -use Symfony\Component\Yaml\Yaml; -use Symfony\Component\Yaml\Exception\ParseException; -use Drupal\migrate\Plugin\MigrationInterface; use GuzzleHttp\Exception\RequestException; +use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Yaml; /** * Gets frontmatter and page urls from metalsmith files. diff --git a/docroot/modules/custom/va_gov_multilingual/va_gov_multilingual.module b/docroot/modules/custom/va_gov_multilingual/va_gov_multilingual.module index 54e180a51d..cb2f31a204 100644 --- a/docroot/modules/custom/va_gov_multilingual/va_gov_multilingual.module +++ b/docroot/modules/custom/va_gov_multilingual/va_gov_multilingual.module @@ -10,8 +10,8 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\textfield_counter\Plugin\Field\FieldWidget\StringTextareaWithCounterWidget; use Drupal\textfield_counter\Plugin\Field\FieldWidget\StringTextfieldWithCounterWidget; use Drupal\textfield_counter\Plugin\Field\FieldWidget\TextareaWithCounterWidget; -use Drupal\textfield_counter\Plugin\Field\FieldWidget\TextfieldWithSummaryAndCounterWidget; use Drupal\textfield_counter\Plugin\Field\FieldWidget\TextFieldWithCounterWidget; +use Drupal\textfield_counter\Plugin\Field\FieldWidget\TextfieldWithSummaryAndCounterWidget; /** * Implements hook_field_widget_single_element_form_alter(). diff --git a/docroot/modules/custom/va_gov_notifications/src/Plugin/AdvancedQueue/JobType/OutdatedContentNotification.php b/docroot/modules/custom/va_gov_notifications/src/Plugin/AdvancedQueue/JobType/OutdatedContentNotification.php index fd07a01a00..de5b3c8710 100644 --- a/docroot/modules/custom/va_gov_notifications/src/Plugin/AdvancedQueue/JobType/OutdatedContentNotification.php +++ b/docroot/modules/custom/va_gov_notifications/src/Plugin/AdvancedQueue/JobType/OutdatedContentNotification.php @@ -8,8 +8,8 @@ use Drupal\Core\Logger\LoggerChannelFactoryInterface; use Drupal\Core\Logger\LoggerChannelTrait; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; -use Drupal\message_notify\MessageNotifier; use Drupal\message\Entity\Message; +use Drupal\message_notify\MessageNotifier; use Symfony\Component\DependencyInjection\ContainerInterface; /** diff --git a/docroot/modules/custom/va_gov_notifications/src/Plugin/Notifier/Slack.php b/docroot/modules/custom/va_gov_notifications/src/Plugin/Notifier/Slack.php index 038aea30a4..dd6c6f0340 100644 --- a/docroot/modules/custom/va_gov_notifications/src/Plugin/Notifier/Slack.php +++ b/docroot/modules/custom/va_gov_notifications/src/Plugin/Notifier/Slack.php @@ -6,8 +6,8 @@ use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Logger\LoggerChannelInterface; use Drupal\Core\Render\RendererInterface; -use Drupal\message_notify\Plugin\Notifier\MessageNotifierBase; use Drupal\message\MessageInterface; +use Drupal\message_notify\Plugin\Notifier\MessageNotifierBase; use Drupal\slack\Slack as SlackService; use Psr\Http\Message\ResponseInterface; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/docroot/modules/custom/va_gov_notifications/src/Service/NotificationsManager.php b/docroot/modules/custom/va_gov_notifications/src/Service/NotificationsManager.php index 4031b52fa8..4aeb49ef8b 100644 --- a/docroot/modules/custom/va_gov_notifications/src/Service/NotificationsManager.php +++ b/docroot/modules/custom/va_gov_notifications/src/Service/NotificationsManager.php @@ -3,8 +3,8 @@ namespace Drupal\va_gov_notifications\Service; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\message_notify\MessageNotifier; use Drupal\message\Entity\Message; +use Drupal\message_notify\MessageNotifier; use Drupal\node\NodeInterface; /** diff --git a/docroot/modules/custom/va_gov_post_api/src/Form/VaGovFacilityForceQueueForm.php b/docroot/modules/custom/va_gov_post_api/src/Form/VaGovFacilityForceQueueForm.php index 71a0a6b6a8..23620ff2d8 100644 --- a/docroot/modules/custom/va_gov_post_api/src/Form/VaGovFacilityForceQueueForm.php +++ b/docroot/modules/custom/va_gov_post_api/src/Form/VaGovFacilityForceQueueForm.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_post_api\Form; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Entity\EntityTypeManagerInterface; use Psr\Log\LogLevel; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/docroot/modules/custom/va_gov_preview/src/StaticServiceProvider.php b/docroot/modules/custom/va_gov_preview/src/StaticServiceProvider.php index d920f1d820..c28988e091 100644 --- a/docroot/modules/custom/va_gov_preview/src/StaticServiceProvider.php +++ b/docroot/modules/custom/va_gov_preview/src/StaticServiceProvider.php @@ -2,9 +2,9 @@ namespace Drupal\va_gov_preview; -use Drupal\Core\StackMiddleware\NegotiationMiddleware; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\DependencyInjection\ServiceModifierInterface; +use Drupal\Core\StackMiddleware\NegotiationMiddleware; /** * Adds application/static+html as known format. diff --git a/docroot/modules/custom/va_gov_profile/src/EventSubscriber/EntityEventSubscriber.php b/docroot/modules/custom/va_gov_profile/src/EventSubscriber/EntityEventSubscriber.php index a2e412a761..52538c5829 100644 --- a/docroot/modules/custom/va_gov_profile/src/EventSubscriber/EntityEventSubscriber.php +++ b/docroot/modules/custom/va_gov_profile/src/EventSubscriber/EntityEventSubscriber.php @@ -2,11 +2,11 @@ namespace Drupal\va_gov_profile\EventSubscriber; +use Drupal\Core\Entity\EntityTypeManager; +use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\core_event_dispatcher\EntityHookEvents; use Drupal\core_event_dispatcher\Event\Entity\EntityTypeAlterEvent; use Drupal\core_event_dispatcher\Event\Form\FormIdAlterEvent; -use Drupal\Core\Entity\EntityTypeManager; -use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\va_gov_user\Service\UserPermsService; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/docroot/modules/custom/va_gov_resources_and_support/va_gov_resources_and_support.deploy.php b/docroot/modules/custom/va_gov_resources_and_support/va_gov_resources_and_support.deploy.php index 8bfcf5091c..3845a21009 100644 --- a/docroot/modules/custom/va_gov_resources_and_support/va_gov_resources_and_support.deploy.php +++ b/docroot/modules/custom/va_gov_resources_and_support/va_gov_resources_and_support.deploy.php @@ -16,8 +16,8 @@ require_once __DIR__ . '/../../../../scripts/content/script-library.php'; use Drupal\node\Entity\Node; -use Psr\Log\LogLevel; use Drupal\taxonomy\Entity\Term; +use Psr\Log\LogLevel; /** * Migrate Publication field_benefits data to new field_lc_categories field. diff --git a/docroot/modules/custom/va_gov_user/src/EventSubscriber/UserImport.php b/docroot/modules/custom/va_gov_user/src/EventSubscriber/UserImport.php index 8b5aeee047..a0159dd9cc 100644 --- a/docroot/modules/custom/va_gov_user/src/EventSubscriber/UserImport.php +++ b/docroot/modules/custom/va_gov_user/src/EventSubscriber/UserImport.php @@ -3,15 +3,15 @@ namespace Drupal\va_gov_user\EventSubscriber; use Drupal\Core\Entity\EntityTypeManager; -use Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler; use Drupal\Core\Messenger\MessengerInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\TranslationInterface; use Drupal\externalauth\ExternalAuth; +use Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler; +use Drupal\migrate\Event\MigrateEvents; use Drupal\migrate\Event\MigrateImportEvent; use Drupal\migrate\Event\MigratePostRowSaveEvent; use Drupal\migrate\Event\MigratePreRowSaveEvent; -use Drupal\migrate\Event\MigrateEvents; use Drupal\migrate\MigrateSkipRowException; use Drupal\migrate\Row; use Drupal\user\UserInterface; diff --git a/docroot/modules/custom/va_gov_vamc/src/EntityAutocompleteMatcher.php b/docroot/modules/custom/va_gov_vamc/src/EntityAutocompleteMatcher.php index aa183e32a2..7a32d5c727 100644 --- a/docroot/modules/custom/va_gov_vamc/src/EntityAutocompleteMatcher.php +++ b/docroot/modules/custom/va_gov_vamc/src/EntityAutocompleteMatcher.php @@ -5,9 +5,9 @@ use Drupal\Component\Utility\Html; use Drupal\Component\Utility\Tags; use Drupal\Core\Entity\EntityAutocompleteMatcherInterface; +use Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManagerInterface; use Drupal\Core\Entity\EntityRepository; use Drupal\Core\Entity\EntityTypeManager; -use Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManagerInterface; /** * Matcher class to get autocompletion results for entity reference. diff --git a/docroot/modules/custom/va_gov_vamc/src/EventSubscriber/VAMCEntityEventSubscriber.php b/docroot/modules/custom/va_gov_vamc/src/EventSubscriber/VAMCEntityEventSubscriber.php index 968d481f5d..d9d866d106 100644 --- a/docroot/modules/custom/va_gov_vamc/src/EventSubscriber/VAMCEntityEventSubscriber.php +++ b/docroot/modules/custom/va_gov_vamc/src/EventSubscriber/VAMCEntityEventSubscriber.php @@ -3,16 +3,16 @@ namespace Drupal\va_gov_vamc\EventSubscriber; use Drupal\Component\Render\FormattableMarkup; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityTypeManager; +use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Session\AccountInterface; use Drupal\core_event_dispatcher\EntityHookEvents; use Drupal\core_event_dispatcher\Event\Entity\EntityInsertEvent; use Drupal\core_event_dispatcher\Event\Entity\EntityPresaveEvent; use Drupal\core_event_dispatcher\Event\Entity\EntityUpdateEvent; use Drupal\core_event_dispatcher\Event\Entity\EntityViewAlterEvent; use Drupal\core_event_dispatcher\Event\Form\FormIdAlterEvent; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityTypeManager; -use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Session\AccountInterface; use Drupal\node\NodeInterface; use Drupal\paragraphs\ParagraphInterface; use Drupal\va_gov_notifications\Service\NotificationsManager; diff --git a/docroot/modules/custom/va_gov_vamc/src/EventSubscriber/VAMCEntityPreventReuse.php b/docroot/modules/custom/va_gov_vamc/src/EventSubscriber/VAMCEntityPreventReuse.php index 7225cc5a29..4e12fe946e 100644 --- a/docroot/modules/custom/va_gov_vamc/src/EventSubscriber/VAMCEntityPreventReuse.php +++ b/docroot/modules/custom/va_gov_vamc/src/EventSubscriber/VAMCEntityPreventReuse.php @@ -2,14 +2,14 @@ namespace Drupal\va_gov_vamc\EventSubscriber; -use Drupal\core_event_dispatcher\EntityHookEvents; -use Drupal\core_event_dispatcher\Event\Entity\EntityAccessEvent; -use Drupal\core_event_dispatcher\Event\Entity\EntityViewEvent; use Drupal\Core\Access\AccessResult; use Drupal\Core\Database\Connection; use Drupal\Core\Messenger\MessengerInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\core_event_dispatcher\EntityHookEvents; +use Drupal\core_event_dispatcher\Event\Entity\EntityAccessEvent; +use Drupal\core_event_dispatcher\Event\Entity\EntityViewEvent; use Drupal\node\NodeInterface; use Drupal\va_gov_facilities\FacilityOps; use Drupal\va_gov_user\Service\UserPermsService; diff --git a/docroot/modules/custom/va_gov_vamc/va_gov_vamc.install b/docroot/modules/custom/va_gov_vamc/va_gov_vamc.install index 847284157f..05ef02c07c 100644 --- a/docroot/modules/custom/va_gov_vamc/va_gov_vamc.install +++ b/docroot/modules/custom/va_gov_vamc/va_gov_vamc.install @@ -5,9 +5,9 @@ * Install file for VA Gov VAMC. */ -use Drupal\field\Entity\FieldConfig; -use Drupal\Core\Utility\UpdateException; use Drupal\Component\Render\FormattableMarkup; +use Drupal\Core\Utility\UpdateException; +use Drupal\field\Entity\FieldConfig; use Drupal\menu_link_content\Entity\MenuLinkContent; use Drupal\node\Entity\Node; use Psr\Log\LogLevel; diff --git a/docroot/modules/custom/va_gov_vet_center/src/Plugin/QueueWorker/RequiredServiceBase.php b/docroot/modules/custom/va_gov_vet_center/src/Plugin/QueueWorker/RequiredServiceBase.php index 8af2dac6e1..281c553a52 100644 --- a/docroot/modules/custom/va_gov_vet_center/src/Plugin/QueueWorker/RequiredServiceBase.php +++ b/docroot/modules/custom/va_gov_vet_center/src/Plugin/QueueWorker/RequiredServiceBase.php @@ -5,8 +5,8 @@ use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Queue\QueueWorkerBase; -use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\node\Entity\Node; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides base functionality for the Subscription Builder Queue Workers. diff --git a/docroot/modules/custom/va_gov_vet_center/va_gov_vet_center.module b/docroot/modules/custom/va_gov_vet_center/va_gov_vet_center.module index a46ed09908..b491667a0d 100644 --- a/docroot/modules/custom/va_gov_vet_center/va_gov_vet_center.module +++ b/docroot/modules/custom/va_gov_vet_center/va_gov_vet_center.module @@ -5,10 +5,10 @@ * Contains va_gov_vet_center.module. */ -use Drupal\views\Views; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\views\Views; /** * Implements hook_help(). diff --git a/docroot/modules/custom/va_gov_workflow/va_gov_workflow.module b/docroot/modules/custom/va_gov_workflow/va_gov_workflow.module index 4e940c0bea..3a8187103a 100644 --- a/docroot/modules/custom/va_gov_workflow/va_gov_workflow.module +++ b/docroot/modules/custom/va_gov_workflow/va_gov_workflow.module @@ -5,9 +5,9 @@ * Contains va_gov_workflow.module. */ +use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Entity\ContentEntityTypeInterface; /** * Implements hook_help(). diff --git a/docroot/modules/custom/va_gov_workflow_assignments/src/Service/SectionHierarchyBreadcrumb.php b/docroot/modules/custom/va_gov_workflow_assignments/src/Service/SectionHierarchyBreadcrumb.php index b7337beeaa..ad8c343b2a 100644 --- a/docroot/modules/custom/va_gov_workflow_assignments/src/Service/SectionHierarchyBreadcrumb.php +++ b/docroot/modules/custom/va_gov_workflow_assignments/src/Service/SectionHierarchyBreadcrumb.php @@ -3,10 +3,10 @@ namespace Drupal\va_gov_workflow_assignments\Service; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Utility\LinkGeneratorInterface; use Drupal\Core\Link; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\TranslationInterface; +use Drupal\Core\Utility\LinkGeneratorInterface; use Drupal\node\NodeInterface; use Drupal\taxonomy\TermInterface; diff --git a/docroot/phpcs.baseline.xml b/docroot/phpcs.baseline.xml new file mode 100644 index 0000000000..31a983cb72 --- /dev/null +++ b/docroot/phpcs.baseline.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docroot/themes/custom/vagovclaro/package-lock.json b/docroot/themes/custom/vagovclaro/package-lock.json index ed07a9cd97..3a15204539 100644 --- a/docroot/themes/custom/vagovclaro/package-lock.json +++ b/docroot/themes/custom/vagovclaro/package-lock.json @@ -12,7 +12,7 @@ "@babel/core": "^7.21.8", "@babel/preset-env": "^7.21.5", "autoprefixer": "^10.4.14", - "axios": "^1.3.4", + "axios": "^1.6.0", "breakpoint-sass": "^3.0.0", "browser-sync": "^2.29.0", "child_process": "^1.0.2", @@ -2853,9 +2853,9 @@ } }, "node_modules/axios": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", - "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dev": true, "dependencies": { "follow-redirects": "^1.15.0", @@ -12831,9 +12831,9 @@ "dev": true }, "axios": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", - "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dev": true, "requires": { "follow-redirects": "^1.15.0", diff --git a/docroot/themes/custom/vagovclaro/package.json b/docroot/themes/custom/vagovclaro/package.json index f660b093b1..8570ead624 100644 --- a/docroot/themes/custom/vagovclaro/package.json +++ b/docroot/themes/custom/vagovclaro/package.json @@ -11,7 +11,7 @@ "@babel/core": "^7.21.8", "@babel/preset-env": "^7.21.5", "autoprefixer": "^10.4.14", - "axios": "^1.3.4", + "axios": "^1.6.0", "breakpoint-sass": "^3.0.0", "browser-sync": "^2.29.0", "child_process": "^1.0.2", diff --git a/docroot/themes/custom/vagovclaro/vagovclaro.theme b/docroot/themes/custom/vagovclaro/vagovclaro.theme index b4b8c37ce4..3612b5a486 100644 --- a/docroot/themes/custom/vagovclaro/vagovclaro.theme +++ b/docroot/themes/custom/vagovclaro/vagovclaro.theme @@ -6,9 +6,9 @@ */ use Drupal\block\Entity\Block; -use Drupal\Core\Url; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; +use Drupal\Core\Url; use Drupal\node\Entity\Node; use Drupal\node\NodeInterface; diff --git a/hooks/git/pre-commit b/hooks/git/pre-commit index f4b6a97cba..eae146b86e 100755 --- a/hooks/git/pre-commit +++ b/hooks/git/pre-commit @@ -3,7 +3,7 @@ # Check a specified branch name against a list of allowed patterns. function check_branch_name() { case $1 in - VAGOV-TEAM-[1-9][0-9]* | VACMS-[1-9][0-9]* | dependabot/* | revert-* | "") return 0;; + VAGOV-TEAM-[1-9][0-9]* | VACMS-[1-9][0-9]* | dependabot/* | revert-* | [1-9][0-9]* | "") return 0;; *) return 1;; esac } @@ -22,7 +22,8 @@ function branch_name_error() { cat <<-EOF >&2 Aborting commit. Your branch name must be prefixed with one of the following: - a VAGOV-TEAM-* or VACMS-* Github issue number format, - e.g. VAGOV-TEAM-123-issue-name or VACMS-123-issue-name. + e.g. VAGOV-TEAM-123-issue-name or VACMS-123-issue-name + - a new GitHub issue number format, e.g. 123-issue-name - dependabot/* (for work on Dependabot PRs) - revert-* (for work on GitHub-initiated revert PRs) diff --git a/package-lock.json b/package-lock.json index 96c5b3b11f..985df32fe2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5885,22 +5885,25 @@ } }, "node_modules/browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz", + "integrity": "sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==", "dev": true, "optional": true, "peer": true, "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", + "elliptic": "^6.5.4", "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "parse-asn1": "^5.1.6", + "readable-stream": "^3.6.2", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 4" } }, "node_modules/browserify-sign/node_modules/readable-stream": { @@ -20678,22 +20681,22 @@ } }, "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz", + "integrity": "sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==", "dev": true, "optional": true, "peer": true, "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", + "elliptic": "^6.5.4", "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "parse-asn1": "^5.1.6", + "readable-stream": "^3.6.2", + "safe-buffer": "^5.2.1" }, "dependencies": { "readable-stream": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ee17592bd0..744efcbf12 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,14 +1,79 @@ parameters: ignoreErrors: - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" + message: "#^Call to an undefined method GuzzleHttp\\\\ClientInterface\\:\\:get\\(\\)\\.$#" count: 1 - path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PdfCheckValidator.php + path: docroot/modules/custom/va_gov_backend/src/Controller/ContentReleaseStatusController.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" + message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" count: 1 - path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/UniqueTitleValidator.php + path: docroot/modules/custom/va_gov_backend/src/Plugin/Filter/EmailLinkRepairFilter.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:setAttribute\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Filter/EmailLinkRepairFilter.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Filter/NodeLinkEnforcementFilter.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:setAttribute\\(\\)\\.$#" + count: 3 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Filter/NodeLinkEnforcementFilter.php + + - + message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\Query\\\\QueryInterface\\:\\:distinct\\(\\)\\.$#" + count: 2 + path: docroot/modules/custom/va_gov_backend/src/Plugin/MetricsCollector/ActiveUserCount.php + + - + message: "#^Access to an undefined property Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:\\$plainTextMessage\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventAbsoluteCmsLinksValidator.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventAbsoluteCmsLinksValidator.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventAbsoluteUrlsAsPathsInLinksValidator.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventDomainsAsPathsInLinksValidator.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventLocalFileLinksValidator.php + + - + message: "#^Access to an undefined property Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:\\$richTextMessage\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventMediaViewLinksValidator.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventMediaViewLinksValidator.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventProtocolRelativeLinksValidator.php + + - + message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/src/Plugin/Validation/Constraint/PreventVaGovDomainsAsPathsInLinksValidator.php - message: "#^Call to an undefined method GuzzleHttp\\\\ClientInterface\\:\\:head\\(\\)\\.$#" @@ -40,16 +105,26 @@ parameters: count: 1 path: docroot/modules/custom/va_gov_backend/va_gov_backend.module + - + message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\\\:\\:\\$caption\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/va_gov_backend.module + + - + message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\FieldItemListInterface\\\\:\\:\\$pathauto\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/va_gov_backend.module + + - + message: "#^Undefined variable\\: \\$mime$#" + count: 1 + path: docroot/modules/custom/va_gov_backend/va_gov_backend.module + - message: "#^Call to an undefined method Psr\\\\Log\\\\LoggerInterface\\:\\:success\\(\\)\\.$#" count: 2 path: docroot/modules/custom/va_gov_build_trigger/src/Commands/SiteStatusCommands.php - - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" - count: 3 - path: docroot/modules/custom/va_gov_build_trigger/src/Form/PreviewForm.php - - message: "#^Method Drupal\\\\va_gov_build_trigger\\\\Plugin\\\\AdvancedQueue\\\\JobType\\\\ReleaseDispatch\\:\\:process\\(\\) should return Drupal\\\\advancedqueue\\\\JobResult but return statement is missing\\.$#" count: 1 @@ -65,11 +140,6 @@ parameters: count: 2 path: docroot/modules/custom/va_gov_clone/src/CloneManager.php - - - message: "#^Access to an undefined property Drupal\\\\va_gov_consumers\\\\Git\\\\GithubFactory\\:\\:\\$logger\\.$#" - count: 1 - path: docroot/modules/custom/va_gov_consumers/src/Git/GithubFactory.php - - message: "#^Access to an undefined property object\\:\\:\\$children\\.$#" count: 1 @@ -80,6 +150,16 @@ parameters: count: 3 path: docroot/modules/custom/va_gov_consumers/va_gov_consumers.module + - + message: "#^Variable \\$vc_node_fetch in empty\\(\\) always exists and is not falsy\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_dashboards/va_gov_dashboards.module + + - + message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\RevisionableInterface\\:\\:get\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_db/va_gov_db.install + - message: "#^Call to an undefined method Drupal\\\\node\\\\Entity\\\\Node\\:\\:setRevisionAuthorId\\(\\)\\.$#" count: 2 @@ -90,11 +170,31 @@ parameters: count: 1 path: docroot/modules/custom/va_gov_db/va_gov_db.install + - + message: "#^Call to an undefined method Drupal\\\\node\\\\Entity\\\\Node\\:\\:setRevisionAuthorId\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_db/va_gov_db.post_update.php + - message: "#^Variable \\$nids might not be defined\\.$#" count: 1 path: docroot/modules/custom/va_gov_db/va_gov_db.post_update.php + - + message: "#^Static call to instance method Drupal\\\\smart_date_recur\\\\Entity\\\\SmartDateRule\\:\\:getMonthsLimit\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_events/src/Controller/Instances.php + + - + message: "#^Variable \\$messages in empty\\(\\) always exists and is not falsy\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_events/src/Form/SmartDateOverrideForm.php + + - + message: "#^PHPDoc tag @var above a method has no effect\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_govdelivery/src/EventSubscriber/EntityEventSubscriber.php + - message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface\\:\\:isPublished\\(\\)\\.$#" count: 1 @@ -105,11 +205,36 @@ parameters: count: 1 path: docroot/modules/custom/va_gov_govdelivery/src/Service/ProcessStatusBulletin.php + - + message: "#^Method Drupal\\\\va_gov_govdelivery\\\\Service\\\\ProcessStatusBulletin\\:\\:getVamcs\\(\\) has invalid return type Drupal\\\\va_gov_govdelivery\\\\Service\\\\vamcs\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_govdelivery/src/Service/ProcessStatusBulletin.php + + - + message: "#^PHPDoc tag @return with type array\\[Drupal\\\\va_gov_govdelivery\\\\Service\\\\vamcs\\] is not subtype of native type array\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_govdelivery/src/Service/ProcessStatusBulletin.php + + - + message: "#^PHPDoc tag @var above a method has no effect\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_govdelivery/src/Service/ProcessStatusBulletin.php + + - + message: "#^PHPDoc tag @var does not specify variable name\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_govdelivery/src/Service/ProcessStatusBulletin.php + - message: "#^Property Drupal\\\\va_gov_govdelivery\\\\Service\\\\ProcessStatusBulletin\\:\\:\\$renderer has unknown class Drupal\\\\va_gov_govdelivery\\\\Service\\\\Drupal\\\\Core\\\\Render\\\\RendererInterface as its type\\.$#" count: 1 path: docroot/modules/custom/va_gov_govdelivery/src/Service/ProcessStatusBulletin.php + - + message: "#^Variable \\$latest_situation_update in empty\\(\\) always exists and is not falsy\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_govdelivery/src/Service/ProcessStatusBulletin.php + - message: "#^Variable \\$subject_prefix might not be defined\\.$#" count: 1 @@ -120,15 +245,35 @@ parameters: count: 1 path: docroot/modules/custom/va_gov_govdelivery/src/Service/ProcessStatusBulletin.php + - + message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\RevisionableInterface\\:\\:isPublished\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_govdelivery/va_gov_govdelivery.module + - message: "#^Call to an undefined method Drupal\\\\Core\\\\Form\\\\FormInterface\\:\\:getEntity\\(\\)\\.$#" count: 1 path: docroot/modules/custom/va_gov_govdelivery/va_gov_govdelivery.module - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" + message: "#^Access to an undefined property Symfony\\\\Component\\\\Validator\\\\ConstraintViolationInterface\\:\\:\\$arrayPropertyPath\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_magichead/src/Plugin/Field/FieldWidget/MagicHeadParagraphsClassicWidget.php + + - + message: "#^Access to an undefined property Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:\\$maximumDepthErrorMessage\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_magichead/src/Plugin/Validation/Constraint/DepthFieldConstraintValidator.php + + - + message: "#^Access to an undefined property Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:\\$negativeDepthErrorMessage\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_magichead/src/Plugin/Validation/Constraint/DepthFieldConstraintValidator.php + + - + message: "#^Access to an undefined property Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:\\$skippedDepthErrorMessage\\.$#" count: 1 - path: docroot/modules/custom/va_gov_graphql/src/Routing/RouteSubscriber.php + path: docroot/modules/custom/va_gov_magichead/src/Plugin/Validation/Constraint/DepthFieldConstraintValidator.php - message: "#^Call to method getFormObject\\(\\) on an unknown class Drupal\\\\va_gov_menu_access\\\\Service\\\\Drupal\\\\Core\\\\Form\\\\FormStateInterface\\.$#" @@ -146,29 +291,29 @@ parameters: path: docroot/modules/custom/va_gov_menu_access/src/Service/MenuReductionService.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" - count: 3 - path: docroot/modules/custom/va_gov_migrate/src/EventSubscriber/PostRowSave.php + message: "#^Variable \\$anomalies might not be defined\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_migrate/src/Obtainer/ObtainAndTestBody.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" - count: 4 - path: docroot/modules/custom/va_gov_migrate/src/Form/MigrateConfigForm.php + message: "#^Method Drupal\\\\va_gov_migrate\\\\Paragraph\\\\CollapsiblePanel\\:\\:isParagraph\\(\\) should return bool but return statement is missing\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanel.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" + message: "#^Variable \\$answer in empty\\(\\) always exists and is not falsy\\.$#" count: 1 - path: docroot/modules/custom/va_gov_migrate/src/Obtainer/ObtainAlertBlockTitles.php + path: docroot/modules/custom/va_gov_migrate/src/Paragraph/QAAccordion.php - - message: "#^Variable \\$anomalies might not be defined\\.$#" + message: "#^Variable \\$answer in empty\\(\\) always exists and is not falsy\\.$#" count: 1 - path: docroot/modules/custom/va_gov_migrate/src/Obtainer/ObtainAndTestBody.php + path: docroot/modules/custom/va_gov_migrate/src/Paragraph/QASchema.php - - message: "#^Method Drupal\\\\va_gov_migrate\\\\Paragraph\\\\CollapsiblePanel\\:\\:isParagraph\\(\\) should return bool but return statement is missing\\.$#" + message: "#^Variable \\$answerQuery in empty\\(\\) always exists and is not falsy\\.$#" count: 1 - path: docroot/modules/custom/va_gov_migrate/src/Paragraph/CollapsiblePanel.php + path: docroot/modules/custom/va_gov_migrate/src/Paragraph/QAUnstructured.php - message: "#^Variable \\$error might not be defined\\.$#" @@ -201,39 +346,39 @@ parameters: path: docroot/modules/custom/va_gov_migrate/src/Paragraph/ReactWidget.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" - count: 5 - path: docroot/modules/custom/va_gov_migrate/src/ParagraphMigrator.php + message: "#^Cannot access property \\$data on object\\|false\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/MetalsmithSource.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" + message: "#^Variable \\$response in empty\\(\\) always exists and is not falsy\\.$#" count: 1 - path: docroot/modules/custom/va_gov_migrate/src/ParagraphType.php + path: docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/MetalsmithSource.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" + message: "#^Undefined variable\\: \\$source_id$#" count: 1 - path: docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/AlertBlockSource.php + path: docroot/modules/custom/va_gov_migrate/va_gov_migrate.install - - message: "#^Cannot access property \\$data on object\\|false\\.$#" - count: 2 - path: docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/MetalsmithSource.php + message: "#^Call to method getEntity\\(\\) on an unknown class Drupal\\\\va_gov_multilingual_tmgmt\\\\EventSubscriber\\\\Drupal\\\\tmgmt\\\\Form\\\\JobForm\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_multilingual/modules/va_gov_multilingual_tmgmt/src/EventSubscriber/FormEventSubscriber.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" - count: 3 - path: docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/MetalsmithSource.php + message: "#^PHPDoc tag @var for variable \\$form_object contains unknown class Drupal\\\\va_gov_multilingual_tmgmt\\\\EventSubscriber\\\\Drupal\\\\tmgmt\\\\Form\\\\JobForm\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_multilingual/modules/va_gov_multilingual_tmgmt/src/EventSubscriber/FormEventSubscriber.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" + message: "#^Class Drupal\\\\textfield_counter\\\\Plugin\\\\Field\\\\FieldWidget\\\\TextFieldWithCounterWidget not found\\.$#" count: 1 - path: docroot/modules/custom/va_gov_migrate/src/Plugin/migrate/source/SupportService.php + path: docroot/modules/custom/va_gov_multilingual/va_gov_multilingual.module - - message: "#^Undefined variable\\: \\$source_id$#" + message: "#^Class Drupal\\\\textfield_counter\\\\Plugin\\\\Field\\\\FieldWidget\\\\TextfieldWithSummaryAndCounterWidget not found\\.$#" count: 1 - path: docroot/modules/custom/va_gov_migrate/va_gov_migrate.install + path: docroot/modules/custom/va_gov_multilingual/va_gov_multilingual.module - message: "#^Call to method setEditedFlag\\(\\) on an unknown class Drupal\\\\va_gov_notifications\\\\FlagDecisionsInterface\\.$#" @@ -246,41 +391,106 @@ parameters: path: docroot/modules/custom/va_gov_notifications/src/Event/Entity/EditedFlag.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" - count: 6 - path: docroot/modules/custom/va_gov_post_api/src/Form/VaGovFacilityForceQueueForm.php + message: "#^Access to an undefined property Drupal\\\\va_gov_post_api\\\\Service\\\\PostFacilityBase\\:\\:\\$additionalInfoToPush\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityBase.php - - message: "#^Access to an undefined property Drupal\\\\va_gov_post_api\\\\Service\\\\PostFacilityService\\:\\:\\$Facility\\.$#" - count: 5 - path: docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityService.php + message: "#^Access to an undefined property Drupal\\\\va_gov_post_api\\\\Service\\\\PostFacilityBase\\:\\:\\$facility\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityBase.php - - message: "#^Method Drupal\\\\va_gov_post_api\\\\Service\\\\PostFacilityService\\:\\:queueFacilityService\\(\\) should return int but return statement is missing\\.$#" + message: "#^Access to an undefined property Drupal\\\\va_gov_post_api\\\\Service\\\\PostFacilityBase\\:\\:\\$facilityNode\\.$#" + count: 3 + path: docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityBase.php + + - + message: "#^Access to an undefined property Drupal\\\\va_gov_post_api\\\\Service\\\\PostFacilityBase\\:\\:\\$statusToPush\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityBase.php + + - + message: "#^PHPDoc tag @param for parameter \\$facility with type Drupal\\\\va_gov_post_api\\\\Service\\\\Drupal\\\\node\\\\NodeInterface is not subtype of native type Drupal\\\\node\\\\NodeInterface\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityBase.php + + - + message: "#^Parameter \\$facility of method Drupal\\\\va_gov_post_api\\\\Service\\\\PostFacilityBase\\:\\:getParentLocationsPageUrl\\(\\) has invalid type Drupal\\\\va_gov_post_api\\\\Service\\\\Drupal\\\\node\\\\NodeInterface\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityBase.php + + - + message: "#^Function _post_api_add_facility_status_to_queue not found\\.$#" count: 1 - path: docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityService.php + path: docroot/modules/custom/va_gov_post_api/va_gov_post_api.install - message: "#^Method Drupal\\\\va_gov_preview\\\\Encoder\\\\StaticEncoder\\:\\:encode\\(\\) should return string but return statement is missing\\.$#" count: 1 path: docroot/modules/custom/va_gov_preview/src/Encoder/StaticEncoder.php + - + message: "#^PHPDoc tag @param for parameter \\$event with type Drupal\\\\va_gov_profile\\\\EventSubscriber\\\\Drupal\\\\core_event_dispatcher\\\\Event\\\\Entity\\\\EntityTypeAlterEvent is not subtype of native type Drupal\\\\core_event_dispatcher\\\\Event\\\\Entity\\\\EntityTypeAlterEvent\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_profile/src/EventSubscriber/EntityEventSubscriber.php + + - + message: "#^Parameter \\$event of method Drupal\\\\va_gov_profile\\\\EventSubscriber\\\\EntityEventSubscriber\\:\\:entityTypeAlter\\(\\) has invalid type Drupal\\\\va_gov_profile\\\\EventSubscriber\\\\Drupal\\\\core_event_dispatcher\\\\Event\\\\Entity\\\\EntityTypeAlterEvent\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_profile/src/EventSubscriber/EntityEventSubscriber.php + + - + message: "#^Access to an undefined property Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:\\$message\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_profile/src/Plugin/Validation/Constraint/PersonPageRequiredFieldsConstraintValidator.php + + - + message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\FieldItemInterface\\:\\:\\$value\\.$#" + count: 2 + path: docroot/modules/custom/va_gov_resources_and_support/va_gov_resources_and_support.deploy.php + - message: "#^Access to an undefined property Drupal\\\\va_gov_user\\\\EventSubscriber\\\\UserImport\\:\\:\\$string_translation\\.$#" count: 1 path: docroot/modules/custom/va_gov_user/src/EventSubscriber/UserImport.php + - + message: "#^PHPDoc tag @return with type array\\[int\\] is not subtype of native type array\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_user/src/EventSubscriber/UserImport.php + - message: "#^Call to an undefined method Drupal\\\\Core\\\\Database\\\\Database\\:\\:select\\(\\)\\.$#" count: 1 path: docroot/modules/custom/va_gov_user/src/Service/UserPermsService.php - - message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#" - count: 2 - path: docroot/modules/custom/va_gov_user/src/Service/UserPermsService.php + message: "#^Call to an undefined method Drupal\\\\Core\\\\Entity\\\\ContentEntityInterface\\:\\:isPublished\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_vamc/src/EventSubscriber/VAMCEntityPreventReuse.php - - message: "#^Access to an undefined property Drupal\\\\Core\\\\Field\\\\FieldItemInterface\\:\\:\\$value\\.$#" + message: "#^Cannot access property \\$data on object\\|true\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_vet_center/src/Service/RequiredServices.php + + - + message: "#^Cannot access property \\$item_id on object\\|true\\.$#" count: 2 - path: docroot/modules/custom/va_gov_resources_and_support/va_gov_resources_and_support.deploy.php + path: docroot/modules/custom/va_gov_vet_center/src/Service/RequiredServices.php + + - + message: "#^Call to an undefined method Drupal\\\\Core\\\\Form\\\\FormInterface\\:\\:getEntity\\(\\)\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_workflow/src/EventSubscriber/EntityEventSubscriber.php + + - + message: "#^Cannot call method toArray\\(\\) on false\\.$#" + count: 1 + path: docroot/modules/custom/va_gov_workflow/src/EventSubscriber/EntityEventSubscriber.php + + - + message: "#^Variable \\$process might not be defined\\.$#" + count: 7 + path: tests/scaling_performance.php diff --git a/tests/phpunit/Content/PreventAbsoluteCmsLinksValidatorTest.php b/tests/phpunit/Content/PreventAbsoluteCmsLinksValidatorTest.php index f27f13ce9f..a21cdcca58 100644 --- a/tests/phpunit/Content/PreventAbsoluteCmsLinksValidatorTest.php +++ b/tests/phpunit/Content/PreventAbsoluteCmsLinksValidatorTest.php @@ -4,8 +4,8 @@ use Drupal\va_gov_backend\Plugin\Validation\Constraint\PreventAbsoluteCmsLinks; use Drupal\va_gov_backend\Plugin\Validation\Constraint\PreventAbsoluteCmsLinksValidator; -use Tests\Support\Traits\ValidatorTestTrait; use Tests\Support\Classes\VaGovUnitTestBase; +use Tests\Support\Traits\ValidatorTestTrait; /** * A test to confirm the proper functioning of this validator. diff --git a/tests/phpunit/Content/PreventLocalFileLinksValidatorTest.php b/tests/phpunit/Content/PreventLocalFileLinksValidatorTest.php index ac882584d6..c8d5f10127 100644 --- a/tests/phpunit/Content/PreventLocalFileLinksValidatorTest.php +++ b/tests/phpunit/Content/PreventLocalFileLinksValidatorTest.php @@ -4,8 +4,8 @@ use Drupal\va_gov_backend\Plugin\Validation\Constraint\PreventLocalFileLinks; use Drupal\va_gov_backend\Plugin\Validation\Constraint\PreventLocalFileLinksValidator; -use Tests\Support\Traits\ValidatorTestTrait; use Tests\Support\Classes\VaGovUnitTestBase; +use Tests\Support\Traits\ValidatorTestTrait; /** * A test to confirm the proper functioning of this validator. diff --git a/tests/phpunit/Content/PreventPreviewUrlLinksValidatorTest.php b/tests/phpunit/Content/PreventPreviewUrlLinksValidatorTest.php new file mode 100644 index 0000000000..e24c684502 --- /dev/null +++ b/tests/phpunit/Content/PreventPreviewUrlLinksValidatorTest.php @@ -0,0 +1,131 @@ +prepareValidator($validator, FALSE); + $validator->addViolation(3, 'Test violation'); + } + + /** + * Test ::validate(). + * + * @param bool $willValidate + * TRUE if the test string should validate, otherwise FALSE. + * @param string $testString + * Some test string to attempt to validate. + * @param string $fieldType + * The type of the text field, e.g. 'text_long' or 'string_long'. + * @param string $format + * An optional format, like 'plain_text' or 'rich_text'. + * + * @covers validate + * @covers validateText + * @covers validateHtml + * @dataProvider validateDataProvider + */ + public function testValidate(bool $willValidate, string $testString, string $fieldType = 'string_long', string $format = NULL) { + $value = [ + 'value' => $testString, + ]; + if ($fieldType !== 'string_long') { + $value['format'] = $format; + } + $items = $this->getFieldItemList([ + $this->getFieldItem($value, $fieldType), + ]); + $validator = new PreventPreviewUrlLinksValidator(); + $this->prepareValidator($validator, $willValidate); + $validator->validate($items, new PreventPreviewUrlLinks()); + } + + /** + * Data provider. + */ + public function validateDataProvider() { + return [ + [ + TRUE, + 'Normal string_long text should not fail validation.', + ], + [ + TRUE, + 'Normal string_long text with the occasional // scattered throughout should not // fail validation.', + ], + [ + FALSE, + 'However, string_long text with http://preview-staging.vfs.va.gov/path/to/content that consists of an Preview URL should fail validation.', + ], + [ + FALSE, + 'However, string_long text with http://preview-prod.vfs.va.gov/path/to/content that consists of an Preview URL should fail validation.', + ], + [ + TRUE, + 'Normal text_long text should not fail validation.', + 'text_long', + ], + [ + FALSE, + 'Something with a http://preview-staging.vfs.va.gov/path/to/content looks like it contains an Preview URL and should fail.', + 'text_long', + 'plain_text', + ], + [ + FALSE, + 'Something with a https://preview-prod.vfs.va.gov/path/to/content looks like it contains an Preview URL and should fail.', + 'text_long', + 'plain_text', + ], + [ + FALSE, + 'This contains a path consisting of an Preview URL inside a tag and should fail.', + 'text_long', + 'plain_text', + ], + [ + FALSE, + 'This contains a path consisting of an Preview URL inside a tag and should fail.', + 'text_long', + 'plain_text', + ], + [ + TRUE, + 'http://preview-staging.vfs.va.gov/path/to/content outside of anchor tags should not trigger the validator.', + 'text_long', + 'rich_text', + ], + [ + TRUE, + 'http://preview-prod.vfs.va.gov/path/to/content outside of anchor tags should not trigger the validator.', + 'text_long', + 'rich_text', + ], + ]; + } + +} diff --git a/tests/phpunit/FrontendBuild/BuildMetricsTest.php b/tests/phpunit/FrontendBuild/BuildMetricsTest.php index bbabd69d2a..1e6a0228b5 100644 --- a/tests/phpunit/FrontendBuild/BuildMetricsTest.php +++ b/tests/phpunit/FrontendBuild/BuildMetricsTest.php @@ -11,8 +11,8 @@ use Drupal\va_gov_build_trigger\Plugin\MetricsCollector\ContentReleaseIntervalRollingAverage; use Drupal\va_gov_build_trigger\Plugin\MetricsCollector\TimeSinceLastContentRelease; use Drupal\va_gov_build_trigger\Service\ReleaseStateManager; -use Tests\Support\Mock\SpecifiedTime; use Tests\Support\Classes\VaGovUnitTestBase; +use Tests\Support\Mock\SpecifiedTime; /** * Unit test for build metrics. diff --git a/tests/phpunit/FrontendBuild/ReleaseStateManagerTest.php b/tests/phpunit/FrontendBuild/ReleaseStateManagerTest.php index 3ac021fd35..02ec46c49f 100644 --- a/tests/phpunit/FrontendBuild/ReleaseStateManagerTest.php +++ b/tests/phpunit/FrontendBuild/ReleaseStateManagerTest.php @@ -7,9 +7,9 @@ use Drupal\Core\State\State; use Drupal\va_gov_build_trigger\Event\ReleaseStateTransitionEvent; use Drupal\va_gov_build_trigger\Service\ReleaseStateManager; -use Tests\Support\Mock\SpecifiedTime; use Symfony\Component\EventDispatcher\EventDispatcher; use Tests\Support\Classes\VaGovUnitTestBase; +use Tests\Support\Mock\SpecifiedTime; /** * Unit test for the release state manager. diff --git a/tests/phpunit/Migration/VaFacilityNcaMigrationTest.php b/tests/phpunit/Migration/VaFacilityNcaMigrationTest.php index 4b80b5a699..50371f1262 100644 --- a/tests/phpunit/Migration/VaFacilityNcaMigrationTest.php +++ b/tests/phpunit/Migration/VaFacilityNcaMigrationTest.php @@ -2,10 +2,10 @@ namespace tests\phpunit\Migration; +use Tests\Support\Classes\VaGovExistingSiteBase; use Tests\Support\Entity\Storage as EntityStorage; use Tests\Support\Migration\Migrator; use Tests\Support\Mock\HttpClient as MockHttpClient; -use Tests\Support\Classes\VaGovExistingSiteBase; /** * A test to confirm that the VA HC Facility Migration works correctly. diff --git a/tests/phpunit/Migration/VaFormMigrationTest.php b/tests/phpunit/Migration/VaFormMigrationTest.php index 7b6fd37169..1762a3fe78 100644 --- a/tests/phpunit/Migration/VaFormMigrationTest.php +++ b/tests/phpunit/Migration/VaFormMigrationTest.php @@ -2,10 +2,10 @@ namespace tests\phpunit\Migration; +use Tests\Support\Classes\VaGovExistingSiteBase; use Tests\Support\Entity\Storage as EntityStorage; use Tests\Support\Migration\Migrator; use Tests\Support\Mock\HttpClient as MockHttpClient; -use Tests\Support\Classes\VaGovExistingSiteBase; /** * A test to confirm that the VA Form Migration works correctly. diff --git a/tests/phpunit/Migration/VaHealthCareLocalFacilityMigrationTest.php b/tests/phpunit/Migration/VaHealthCareLocalFacilityMigrationTest.php index bf90ba5f39..a951a4e98c 100644 --- a/tests/phpunit/Migration/VaHealthCareLocalFacilityMigrationTest.php +++ b/tests/phpunit/Migration/VaHealthCareLocalFacilityMigrationTest.php @@ -2,10 +2,10 @@ namespace tests\phpunit\Migration; +use Tests\Support\Classes\VaGovExistingSiteBase; use Tests\Support\Entity\Storage as EntityStorage; use Tests\Support\Migration\Migrator; use Tests\Support\Mock\HttpClient as MockHttpClient; -use Tests\Support\Classes\VaGovExistingSiteBase; /** * A test to confirm that the VA HC Facility Migration works correctly. diff --git a/tests/phpunit/Ops/DatadogTest.php b/tests/phpunit/Ops/DatadogTest.php index 7063294d10..764488d78e 100644 --- a/tests/phpunit/Ops/DatadogTest.php +++ b/tests/phpunit/Ops/DatadogTest.php @@ -2,11 +2,11 @@ namespace tests\phpunit\Ops; -use PNX\Prometheus\Gauge; use Drupal\Core\Site\Settings; use Drupal\va_gov_backend\Service\Datadog; -use Tests\Support\Mock\HttpClient; +use PNX\Prometheus\Gauge; use Tests\Support\Classes\VaGovExistingSiteBase; +use Tests\Support\Mock\HttpClient; /** * Test the Datadog service. diff --git a/tests/phpunit/Support/Classes/VaGovBrowserTestBase.php b/tests/phpunit/Support/Classes/VaGovBrowserTestBase.php index 6db38c140a..1e15cfe682 100644 --- a/tests/phpunit/Support/Classes/VaGovBrowserTestBase.php +++ b/tests/phpunit/Support/Classes/VaGovBrowserTestBase.php @@ -2,8 +2,8 @@ namespace Tests\Support\Classes; -use Prophecy\PhpUnit\ProphecyTrait; use Drupal\Tests\BrowserTestBase; +use Prophecy\PhpUnit\ProphecyTrait; /** * Common functionality for BrowserTestBase derivative test classes. diff --git a/tests/phpunit/Support/Classes/VaGovUnitTestBase.php b/tests/phpunit/Support/Classes/VaGovUnitTestBase.php index 240a23cd91..e44ac406b6 100644 --- a/tests/phpunit/Support/Classes/VaGovUnitTestBase.php +++ b/tests/phpunit/Support/Classes/VaGovUnitTestBase.php @@ -2,8 +2,8 @@ namespace Tests\Support\Classes; -use Prophecy\PhpUnit\ProphecyTrait; use Drupal\Tests\UnitTestCase; +use Prophecy\PhpUnit\ProphecyTrait; /** * Common functionality for UnitTestCase derivative test classes. diff --git a/tests/phpunit/Support/Traits/ValidatorTestTrait.php b/tests/phpunit/Support/Traits/ValidatorTestTrait.php index 409731afc9..b40ffebcaa 100644 --- a/tests/phpunit/Support/Traits/ValidatorTestTrait.php +++ b/tests/phpunit/Support/Traits/ValidatorTestTrait.php @@ -5,9 +5,9 @@ use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldItemInterface; use Prophecy\Argument; +use Symfony\Component\Validator\ConstraintValidatorInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; -use Symfony\Component\Validator\ConstraintValidatorInterface; /** * Useful methods for testing constraint validation. diff --git a/tests/phpunit/va_gov_content_release/functional/EventSubscriber/FormRouteSubscriberTest.php b/tests/phpunit/va_gov_content_release/functional/EventSubscriber/FormRouteSubscriberTest.php index 4b624603c1..e56b634489 100644 --- a/tests/phpunit/va_gov_content_release/functional/EventSubscriber/FormRouteSubscriberTest.php +++ b/tests/phpunit/va_gov_content_release/functional/EventSubscriber/FormRouteSubscriberTest.php @@ -3,10 +3,10 @@ namespace tests\phpunit\va_gov_content_release\functional\EventSubscriber; use Drupal\va_gov_content_release\EventSubscriber\FormRouteSubscriber; -use Tests\Support\Classes\VaGovExistingSiteBase; use Drupal\va_gov_content_release\Form\BaseForm; use Drupal\va_gov_content_release\Form\GitForm; use Drupal\va_gov_content_release\Form\SimpleForm; +use Tests\Support\Classes\VaGovExistingSiteBase; /** * Functional test of the Form Route Subscriber service. diff --git a/tests/phpunit/va_gov_content_release/unit/EntityEvent/Strategy/Resolver/ResolverTest.php b/tests/phpunit/va_gov_content_release/unit/EntityEvent/Strategy/Resolver/ResolverTest.php index 9f0d321521..1e102b1962 100644 --- a/tests/phpunit/va_gov_content_release/unit/EntityEvent/Strategy/Resolver/ResolverTest.php +++ b/tests/phpunit/va_gov_content_release/unit/EntityEvent/Strategy/Resolver/ResolverTest.php @@ -4,8 +4,8 @@ use Drupal\va_gov_content_release\EntityEvent\Strategy\Resolver\Resolver; use Drupal\va_gov_content_release\EntityEvent\Strategy\Resolver\ResolverInterface; -use Drupal\va_gov_environment\Environment\Environment; use Drupal\va_gov_environment\Discovery\DiscoveryInterface; +use Drupal\va_gov_environment\Environment\Environment; use Tests\Support\Classes\VaGovUnitTestBase; /** diff --git a/tests/phpunit/va_gov_content_release/unit/EventSubscriber/EntityEventSubscriberTest.php b/tests/phpunit/va_gov_content_release/unit/EventSubscriber/EntityEventSubscriberTest.php index 88724d9170..503cf5d476 100644 --- a/tests/phpunit/va_gov_content_release/unit/EventSubscriber/EntityEventSubscriberTest.php +++ b/tests/phpunit/va_gov_content_release/unit/EventSubscriber/EntityEventSubscriberTest.php @@ -2,16 +2,16 @@ namespace tests\phpunit\va_gov_content_release\unit\EventSubscriber; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Link; use Drupal\core_event_dispatcher\EntityHookEvents; use Drupal\core_event_dispatcher\Event\Entity\AbstractEntityEvent; -use Drupal\Core\Entity\EntityInterface; use Drupal\user\UserInterface; -use Drupal\va_gov_content_release\EntityEvent\Strategy\Plugin\StrategyPluginManagerInterface; use Drupal\va_gov_content_release\EntityEvent\Strategy\Plugin\StrategyPluginInterface; +use Drupal\va_gov_content_release\EntityEvent\Strategy\Plugin\StrategyPluginManagerInterface; use Drupal\va_gov_content_release\EntityEvent\Strategy\Resolver\ResolverInterface; -use Drupal\va_gov_content_release\Request\RequestInterface; use Drupal\va_gov_content_release\EventSubscriber\EntityEventSubscriber; +use Drupal\va_gov_content_release\Request\RequestInterface; use Drupal\va_gov_content_types\Entity\VaNodeInterface; use Prophecy\Argument; use Symfony\Component\DependencyInjection\Container; diff --git a/tests/phpunit/va_gov_content_release/unit/Form/Resolver/ResolverTest.php b/tests/phpunit/va_gov_content_release/unit/Form/Resolver/ResolverTest.php index 07ff156bc7..08620b473f 100644 --- a/tests/phpunit/va_gov_content_release/unit/Form/Resolver/ResolverTest.php +++ b/tests/phpunit/va_gov_content_release/unit/Form/Resolver/ResolverTest.php @@ -2,11 +2,11 @@ namespace tests\phpunit\va_gov_content_release\unit\Form\Resolver; -use Drupal\va_gov_content_release\Form\SimpleForm; use Drupal\va_gov_content_release\Form\GitForm; use Drupal\va_gov_content_release\Form\Resolver\Resolver; -use Drupal\va_gov_environment\Environment\Environment; +use Drupal\va_gov_content_release\Form\SimpleForm; use Drupal\va_gov_environment\Discovery\DiscoveryInterface; +use Drupal\va_gov_environment\Environment\Environment; use Tests\Support\Classes\VaGovUnitTestBase; /** diff --git a/tests/phpunit/va_gov_content_release/unit/GitHub/GitHubRepositoryDispatchTest.php b/tests/phpunit/va_gov_content_release/unit/GitHub/GitHubRepositoryDispatchTest.php index 3c9e70def7..6934f9ec04 100644 --- a/tests/phpunit/va_gov_content_release/unit/GitHub/GitHubRepositoryDispatchTest.php +++ b/tests/phpunit/va_gov_content_release/unit/GitHub/GitHubRepositoryDispatchTest.php @@ -2,10 +2,10 @@ namespace tests\phpunit\va_gov_content_release\unit\GitHub; -use Drupal\va_gov_github\Api\Client\ApiClientInterface; use Drupal\va_gov_content_release\Exception\ContentReleaseInProgressException; use Drupal\va_gov_content_release\Exception\GitHubRepositoryDispatchException; use Drupal\va_gov_content_release\GitHub\GitHubRepositoryDispatch; +use Drupal\va_gov_github\Api\Client\ApiClientInterface; use Prophecy\Argument; use Tests\Support\Classes\VaGovUnitTestBase; diff --git a/tests/phpunit/va_gov_content_release/unit/LocalFilesystem/LocalFilesystemBuildFileTest.php b/tests/phpunit/va_gov_content_release/unit/LocalFilesystem/LocalFilesystemBuildFileTest.php index 9c63a929f4..8780f91385 100644 --- a/tests/phpunit/va_gov_content_release/unit/LocalFilesystem/LocalFilesystemBuildFileTest.php +++ b/tests/phpunit/va_gov_content_release/unit/LocalFilesystem/LocalFilesystemBuildFileTest.php @@ -2,11 +2,11 @@ namespace tests\phpunit\va_gov_content_release\unit\LocalFilesystem; -use Drupal\va_gov_content_release\LocalFilesystem\LocalFilesystemBuildFile; -use Tests\Support\Classes\VaGovUnitTestBase; -use Drupal\Core\File\FileSystemInterface; use Drupal\Core\File\Exception\FileException; +use Drupal\Core\File\FileSystemInterface; use Drupal\va_gov_content_release\Exception\StrategyErrorException; +use Drupal\va_gov_content_release\LocalFilesystem\LocalFilesystemBuildFile; +use Tests\Support\Classes\VaGovUnitTestBase; /** * Unit test of the LocalFilesystemBuildFile service. diff --git a/tests/phpunit/va_gov_content_release/unit/Plugin/EntityEventStrategy/OnDemandTest.php b/tests/phpunit/va_gov_content_release/unit/Plugin/EntityEventStrategy/OnDemandTest.php index 82ac650331..421c88a7c6 100644 --- a/tests/phpunit/va_gov_content_release/unit/Plugin/EntityEventStrategy/OnDemandTest.php +++ b/tests/phpunit/va_gov_content_release/unit/Plugin/EntityEventStrategy/OnDemandTest.php @@ -3,9 +3,9 @@ namespace tests\phpunit\va_gov_content_release\unit\Plugin\EntityEventStrategy; use Drupal\Core\Link; -use Drupal\va_gov_content_types\Entity\VaNodeInterface; -use Drupal\va_gov_content_release\Plugin\EntityEventStrategy\OnDemand; use Drupal\Core\Logger\LoggerChannelFactoryInterface; +use Drupal\va_gov_content_release\Plugin\EntityEventStrategy\OnDemand; +use Drupal\va_gov_content_types\Entity\VaNodeInterface; use Prophecy\Argument; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/tests/phpunit/va_gov_content_release/unit/Plugin/EntityEventStrategy/VerboseFalseTest.php b/tests/phpunit/va_gov_content_release/unit/Plugin/EntityEventStrategy/VerboseFalseTest.php index 8a0efe69a9..7b7523824f 100644 --- a/tests/phpunit/va_gov_content_release/unit/Plugin/EntityEventStrategy/VerboseFalseTest.php +++ b/tests/phpunit/va_gov_content_release/unit/Plugin/EntityEventStrategy/VerboseFalseTest.php @@ -3,14 +3,14 @@ namespace tests\phpunit\va_gov_content_release\unit\Plugin\EntityEventStrategy; use Drupal\Core\Link; -use Drupal\va_gov_content_types\Entity\VaNodeInterface; -use Drupal\va_gov_content_release\Plugin\EntityEventStrategy\VerboseFalse; use Drupal\Core\Logger\LoggerChannelFactoryInterface; +use Drupal\Tests\Traits\Core\GeneratePermutationsTrait; +use Drupal\va_gov_content_release\Plugin\EntityEventStrategy\VerboseFalse; +use Drupal\va_gov_content_types\Entity\VaNodeInterface; use Prophecy\Argument; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Tests\Support\Classes\VaGovUnitTestBase; -use Drupal\Tests\Traits\Core\GeneratePermutationsTrait; /** * Unit test of the Verbose FALSE entity event strategy plugin. diff --git a/tests/phpunit/va_gov_content_release/unit/Plugin/Strategy/GitHubRepositoryDispatchTest.php b/tests/phpunit/va_gov_content_release/unit/Plugin/Strategy/GitHubRepositoryDispatchTest.php index c254671d12..d17df70523 100644 --- a/tests/phpunit/va_gov_content_release/unit/Plugin/Strategy/GitHubRepositoryDispatchTest.php +++ b/tests/phpunit/va_gov_content_release/unit/Plugin/Strategy/GitHubRepositoryDispatchTest.php @@ -7,8 +7,8 @@ use Drupal\va_gov_content_release\Exception\GitHubRepositoryDispatchException; use Drupal\va_gov_content_release\Exception\StrategyErrorException; use Drupal\va_gov_content_release\GitHub\GitHubRepositoryDispatchInterface; -use Drupal\va_gov_content_release\Reporter\ReporterInterface; use Drupal\va_gov_content_release\Plugin\Strategy\GitHubRepositoryDispatch; +use Drupal\va_gov_content_release\Reporter\ReporterInterface; use Prophecy\Argument; use Symfony\Component\DependencyInjection\ContainerInterface; use Tests\Support\Classes\VaGovUnitTestBase; diff --git a/tests/phpunit/va_gov_content_release/unit/Plugin/Strategy/LocalFilesystemBuildFileTest.php b/tests/phpunit/va_gov_content_release/unit/Plugin/Strategy/LocalFilesystemBuildFileTest.php index 9aabdb8447..98299e4ce8 100644 --- a/tests/phpunit/va_gov_content_release/unit/Plugin/Strategy/LocalFilesystemBuildFileTest.php +++ b/tests/phpunit/va_gov_content_release/unit/Plugin/Strategy/LocalFilesystemBuildFileTest.php @@ -6,8 +6,8 @@ use Drupal\Core\StringTranslation\TranslationInterface; use Drupal\va_gov_content_release\Exception\StrategyErrorException; use Drupal\va_gov_content_release\LocalFilesystem\LocalFilesystemBuildFileInterface; -use Drupal\va_gov_content_release\Reporter\ReporterInterface; use Drupal\va_gov_content_release\Plugin\Strategy\LocalFilesystemBuildFile; +use Drupal\va_gov_content_release\Reporter\ReporterInterface; use Prophecy\Argument; use Symfony\Component\DependencyInjection\ContainerInterface; use Tests\Support\Classes\VaGovUnitTestBase; diff --git a/tests/phpunit/va_gov_content_release/unit/Reporter/ReporterTest.php b/tests/phpunit/va_gov_content_release/unit/Reporter/ReporterTest.php index 86652d8c11..179e45125c 100644 --- a/tests/phpunit/va_gov_content_release/unit/Reporter/ReporterTest.php +++ b/tests/phpunit/va_gov_content_release/unit/Reporter/ReporterTest.php @@ -2,9 +2,9 @@ namespace tests\phpunit\va_gov_content_release\unit\Reporter; -use Drupal\Core\StringTranslation\TranslationInterface; use Drupal\Core\Logger\LoggerChannelFactoryInterface; use Drupal\Core\Messenger\MessengerInterface; +use Drupal\Core\StringTranslation\TranslationInterface; use Drupal\va_gov_content_release\Reporter\Reporter; use Prophecy\Argument; use Psr\Log\LoggerInterface; diff --git a/tests/phpunit/va_gov_content_release/unit/Request/RequestTest.php b/tests/phpunit/va_gov_content_release/unit/Request/RequestTest.php index 2466b5ad73..869693b4dc 100644 --- a/tests/phpunit/va_gov_content_release/unit/Request/RequestTest.php +++ b/tests/phpunit/va_gov_content_release/unit/Request/RequestTest.php @@ -2,10 +2,10 @@ namespace tests\phpunit\va_gov_content_release\unit\Request; -use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Entity\EntityStorageInterface; use Drupal\advancedqueue\Entity\QueueInterface; use Drupal\advancedqueue\Job; +use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\va_gov_content_release\Exception\RequestException; use Drupal\va_gov_content_release\Request\Request; use Drupal\va_gov_content_release\Request\RequestInterface; diff --git a/tests/phpunit/va_gov_content_release/unit/Strategy/Resolver/ResolverTest.php b/tests/phpunit/va_gov_content_release/unit/Strategy/Resolver/ResolverTest.php index 92df55c124..68e8b36179 100644 --- a/tests/phpunit/va_gov_content_release/unit/Strategy/Resolver/ResolverTest.php +++ b/tests/phpunit/va_gov_content_release/unit/Strategy/Resolver/ResolverTest.php @@ -4,8 +4,8 @@ use Drupal\va_gov_content_release\Strategy\Resolver\Resolver; use Drupal\va_gov_content_release\Strategy\Resolver\ResolverInterface; -use Drupal\va_gov_environment\Environment\Environment; use Drupal\va_gov_environment\Discovery\DiscoveryInterface; +use Drupal\va_gov_environment\Environment\Environment; use Tests\Support\Classes\VaGovUnitTestBase; /** diff --git a/tests/phpunit/va_gov_environment/unit/Discovery/DiscoveryTest.php b/tests/phpunit/va_gov_environment/unit/Discovery/DiscoveryTest.php index 5dc7e76510..8b1c834e75 100644 --- a/tests/phpunit/va_gov_environment/unit/Discovery/DiscoveryTest.php +++ b/tests/phpunit/va_gov_environment/unit/Discovery/DiscoveryTest.php @@ -3,8 +3,8 @@ namespace tests\phpunit\va_gov_environment\unit\Discovery; use Drupal\Core\Site\Settings; -use Drupal\va_gov_environment\Environment\Environment; use Drupal\va_gov_environment\Discovery\Discovery; +use Drupal\va_gov_environment\Environment\Environment; use Drupal\va_gov_environment\Exception\InvalidEnvironmentException; use Tests\Support\Classes\VaGovUnitTestBase; diff --git a/tests/phpunit/va_gov_github/unit/Api/Client/ApiClientTest.php b/tests/phpunit/va_gov_github/unit/Api/Client/ApiClientTest.php index f0dd353402..b18612dd77 100644 --- a/tests/phpunit/va_gov_github/unit/Api/Client/ApiClientTest.php +++ b/tests/phpunit/va_gov_github/unit/Api/Client/ApiClientTest.php @@ -3,15 +3,15 @@ namespace Tests\va_gov_github\unit\Api\Client; use Drupal\va_gov_github\Api\Client\ApiClient; -use Tests\Support\Traits\RawGitHubApiClientTrait; -use Tests\Support\Classes\VaGovUnitTestBase; -use Github\AuthMethod; use Github\Api\Repo; -use Github\Api\Search; use Github\Api\Repository\Actions\WorkflowRuns; use Github\Api\Repository\Actions\Workflows; +use Github\Api\Search; +use Github\AuthMethod; use Github\Client as RawApiClient; use Prophecy\Argument; +use Tests\Support\Classes\VaGovUnitTestBase; +use Tests\Support\Traits\RawGitHubApiClientTrait; /** * Unit test of the API Client class. diff --git a/tests/phpunit/va_gov_github/unit/Api/Client/RawApiClientTest.php b/tests/phpunit/va_gov_github/unit/Api/Client/RawApiClientTest.php index 2409eb76ac..90e0f01f6d 100644 --- a/tests/phpunit/va_gov_github/unit/Api/Client/RawApiClientTest.php +++ b/tests/phpunit/va_gov_github/unit/Api/Client/RawApiClientTest.php @@ -2,9 +2,9 @@ namespace Tests\va_gov_github\unit\Api\Client; -use Tests\Support\Traits\RawGitHubApiClientTrait; -use Tests\Support\Classes\VaGovUnitTestBase; use Github\AuthMethod; +use Tests\Support\Classes\VaGovUnitTestBase; +use Tests\Support\Traits\RawGitHubApiClientTrait; /** * Unit test of the API Client class. diff --git a/tests/phpunit/va_gov_github/unit/Api/Settings/ApiSettingsTest.php b/tests/phpunit/va_gov_github/unit/Api/Settings/ApiSettingsTest.php index ecf7f5789c..2fd5705f76 100644 --- a/tests/phpunit/va_gov_github/unit/Api/Settings/ApiSettingsTest.php +++ b/tests/phpunit/va_gov_github/unit/Api/Settings/ApiSettingsTest.php @@ -3,8 +3,8 @@ namespace Tests\va_gov_github\unit\Api\Settings; use Drupal\Core\Site\Settings; -use Tests\Support\Classes\VaGovUnitTestBase; use Drupal\va_gov_github\Api\Settings\ApiSettings; +use Tests\Support\Classes\VaGovUnitTestBase; /** * Unit test of the API Settings class.