Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump acquia/coding-standards from 1.1.0 to 3.0.1 #588

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ext-dom": "*",
"ext-json": "*",
"ext-sqlite3": "*",
"acquia/coding-standards": "^1.1.0",
"acquia/coding-standards": "^3.0.1",
"composer/composer": "^2.5.5",
"cweagans/composer-patches": "^1.7.3",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
Expand Down
60 changes: 30 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:
env(ORCA_PACKAGES_CONFIG): config/packages.yml
ORCA_PACKAGES_CONFIG: "%env(ORCA_PACKAGES_CONFIG)%"
env(ORCA_PACKAGES_CONFIG_ALTER): ~
env(ORCA_PHPCS_STANDARD): "AcquiaDrupalTransitional"
env(ORCA_PHPCS_STANDARD): "AcquiaDrupalMinimal"
env(ORCA_PHPUNIT_DEBUG_MODE_ENABLE): "false"
env(ORCA_TELEMETRY_ENABLE): "false"
env(ORCA_IS_ALLOWED_FAILURE): "%env(ORCA_IS_ALLOWED_FAILURE)%"
Expand Down
3 changes: 0 additions & 3 deletions example/src/ExampleComplexity.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ class ExampleComplexity {

/**
* Creates some cyclomatic complexity.
*
* @return int
* An arbitrary number.
*/
public function createComplexity(): int {
$x = 0;
Expand Down
14 changes: 8 additions & 6 deletions src/Enum/PhpcsStandardEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
*/
final class PhpcsStandardEnum extends Enum {

public const ACQUIA_PHP = 'AcquiaPHP';
public const ACQUIA_PHP_MINIMAL = 'AcquiaPHPMinimal ';
public const ACQUIA_PHP_STRICT = 'AcquiaPHPStrict ';

public const ACQUIA_DRUPAL_STRICT = 'AcquiaDrupalStrict';

public const ACQUIA_DRUPAL_TRANSITIONAL = 'AcquiaDrupalTransitional';
public const ACQUIA_DRUPAL_MINIMAL = 'AcquiaDrupalMinimal';

public const DEFAULT = self::ACQUIA_DRUPAL_TRANSITIONAL;
public const DEFAULT = self::ACQUIA_DRUPAL_MINIMAL;

/**
* Provides help text for commands that accept PHPCS standard input.
Expand All @@ -30,9 +31,10 @@ final class PhpcsStandardEnum extends Enum {
*/
public static function commandHelp(): array {
return [
sprintf('- %s: Contains sniffs applicable to all PHP projects', self::ACQUIA_PHP),
sprintf('- %s: Recommended for new Drupal projects and teams familiar with Drupal coding standards', self::ACQUIA_DRUPAL_STRICT),
sprintf('- %s: A relaxed standard for legacy Drupal codebases or teams new to Drupal coding standards', self::ACQUIA_DRUPAL_TRANSITIONAL),
sprintf('- %s: Based on PSR-12 and is intended for use on all public non-Drupal projects', self::ACQUIA_PHP_MINIMAL),
sprintf('- %s: Based on AcquiaDrupal and adds the more opinionated DrupalPractice standard. It is intended for use on all internal Drupal projects', self::ACQUIA_DRUPAL_STRICT),
sprintf('- %s: Based on AcquiaPHP and adds additional, more opinionated standards. It is intended for use on all internal, non-Drupal projects', self::ACQUIA_PHP_STRICT),
sprintf('- %s: Based on the Drupal coding standard and is intended for use on all public Drupal projects', self::ACQUIA_DRUPAL_MINIMAL),
];
}

Expand Down
10 changes: 6 additions & 4 deletions tests/Console/Command/Qa/QaFixerCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ public function testPhpcsStandardOption($args, $standard): void {
public static function providerPhpcsStandardOption(): array {
return [
[[], PhpcsStandardEnum::DEFAULT],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_PHP], PhpcsStandardEnum::ACQUIA_PHP],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_DRUPAL_TRANSITIONAL], PhpcsStandardEnum::ACQUIA_DRUPAL_TRANSITIONAL],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_PHP_MINIMAL], PhpcsStandardEnum::ACQUIA_PHP_MINIMAL],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_PHP_STRICT], PhpcsStandardEnum::ACQUIA_PHP_STRICT],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_DRUPAL_MINIMAL], PhpcsStandardEnum::ACQUIA_DRUPAL_MINIMAL],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_DRUPAL_STRICT], PhpcsStandardEnum::ACQUIA_DRUPAL_STRICT],
];
}
Expand Down Expand Up @@ -195,8 +196,9 @@ public function testPhpcsStandardEnvVar($standard): void {

public static function providerPhpcsStandardEnvVar(): array {
return [
[PhpcsStandardEnum::ACQUIA_PHP],
[PhpcsStandardEnum::ACQUIA_DRUPAL_TRANSITIONAL],
[PhpcsStandardEnum::ACQUIA_PHP_STRICT],
[PhpcsStandardEnum::ACQUIA_PHP_MINIMAL],
[PhpcsStandardEnum::ACQUIA_DRUPAL_MINIMAL],
[PhpcsStandardEnum::ACQUIA_DRUPAL_STRICT],
];
}
Expand Down
12 changes: 7 additions & 5 deletions tests/Console/Command/Qa/QaStaticAnalysisCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static function providerOptions(): array {
['composer', FALSE],
['coverage', FALSE],
['phpcs', FALSE],
['phpcs-standard', 'AcquiaDrupalTransitional'],
['phpcs-standard', 'AcquiaDrupalMinimal'],
['phplint', FALSE],
['phploc', FALSE],
['phpmd', FALSE],
Expand Down Expand Up @@ -307,8 +307,9 @@ public function testPhpcsStandardOption(array $args, $standard): void {
public static function providerPhpcsStandardOption(): array {
return [
[[], PhpcsStandardEnum::DEFAULT],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_PHP], PhpcsStandardEnum::ACQUIA_PHP],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_DRUPAL_TRANSITIONAL], PhpcsStandardEnum::ACQUIA_DRUPAL_TRANSITIONAL],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_PHP_STRICT], PhpcsStandardEnum::ACQUIA_PHP_STRICT],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_PHP_MINIMAL], PhpcsStandardEnum::ACQUIA_PHP_MINIMAL],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_DRUPAL_MINIMAL], PhpcsStandardEnum::ACQUIA_DRUPAL_MINIMAL],
[['--phpcs-standard' => PhpcsStandardEnum::ACQUIA_DRUPAL_STRICT], PhpcsStandardEnum::ACQUIA_DRUPAL_STRICT],
];
}
Expand Down Expand Up @@ -344,8 +345,9 @@ public function testPhpcsStandardEnvVar($standard): void {

public static function providerPhpcsStandardEnvVar(): array {
return [
[PhpcsStandardEnum::ACQUIA_PHP],
[PhpcsStandardEnum::ACQUIA_DRUPAL_TRANSITIONAL],
[PhpcsStandardEnum::ACQUIA_PHP_STRICT],
[PhpcsStandardEnum::ACQUIA_PHP_MINIMAL],
[PhpcsStandardEnum::ACQUIA_DRUPAL_MINIMAL],
[PhpcsStandardEnum::ACQUIA_DRUPAL_STRICT],
];
}
Expand Down
Loading
Loading