Skip to content
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
1 change: 0 additions & 1 deletion .github/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ EXPECTED=(
AcquiaPHPStrict
Drupal
DrupalPractice
PHPCompatibility
)
echo "$INSTALLED"
for STANDARD in "${EXPECTED[@]}"; do
Expand Down
117 changes: 0 additions & 117 deletions .github/workflows/orca.yml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Acquia Coding Standards for PHP includes a selection of sniffs from the followin

* [Drupal Code Sniffer](https://packagist.org/packages/drupal/coder) encapsulates [Drupal coding standards](https://www.drupal.org/coding-standards ) and best practices for module development.
* [PHP_CodeSniffer](https://packagist.org/packages/squizlabs/php_codesniffer) itself contains several broadly applicable rulesets.
* [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility) checks for PHP cross-version compatibility with all supported language versions.
* [Slevomat Coding Standard](https://github.com/slevomat/coding-standard) provides functional (safety and behavior), cleaning (dead code), and formatting (consistent look) sniffs.

## Rulesets
Expand All @@ -39,6 +38,8 @@ There are four permutations of these guidelines, leading to four rulesets to cho
composer require --dev acquia/coding-standards
```

If you want to add PHP cross-version compatibility checks, we suggest [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility).

1. Inform PHP CodeSniffer of the location of the standard and its dependencies:

* It is strongly recommended that you use a Composer plugin to handle this for you, e.g., [`DealerDirect/phpcodesniffer-composer-installer`](https://github.com/DealerDirect/phpcodesniffer-composer-installer):
Expand All @@ -55,7 +56,7 @@ There are four permutations of these guidelines, leading to four rulesets to cho
"scripts": {
"post-install-cmd": "@install-coding-standards",
"post-update-cmd" : "@install-coding-standards",
"install-coding-standards": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/acquia/coding-standards/src/Standards,vendor/drupal/coder/coder_sniffer,vendor/phpcompatibility/php-compatibility,vendor/slevomat/coding-standard"
"install-coding-standards": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/acquia/coding-standards/src/Standards,vendor/drupal/coder/coder_sniffer,vendor/slevomat/coding-standard"
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
],
"require": {
"drupal/coder": "^8.3",
"phpcompatibility/php-compatibility": "^10.0.0-alpha1",
"slevomat/coding-standard": "^8.4",
"squizlabs/php_codesniffer": "^3.7"
},
"suggest": {
"brainmaestro/composer-git-hooks": "Easily manage Git hooks in your composer config.",
"dealerdirect/phpcodesniffer-composer-installer": "Automatically install PHP_CodeSniffer coding standards (rulesets)."
"dealerdirect/phpcodesniffer-composer-installer": "Automatically install PHP_CodeSniffer coding standards (rulesets).",
"phpcompatibility/php-compatibility": "Check for PHP cross-version compatibility."
},
"config": {
"allow-plugins": {
Expand Down
185 changes: 1 addition & 184 deletions composer.lock

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

11 changes: 0 additions & 11 deletions src/Standards/AcquiaDrupalMinimal/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,6 @@
<exclude name="Drupal.Files.TxtFileLineLength.TooLong"/>
</rule>

<!-- PHP Compatibility sniffs -->
<!-- The lowest version of PHP supported by both Drupal and Acquia Cloud.
@see https://www.drupal.org/docs/8/system-requirements/php-requirements
@see https://docs.acquia.com/acquia-cloud/arch/tech-platform/
For instructions on overriding this value in your project,
@see https://github.com/acquia/coding-standards-php/pull/37 -->
<config name="testVersion" value="7.4-"/>
<rule ref="PHPCompatibility">
<exclude name="PHPCompatibility.Extensions.RemovedExtensions.famRemoved"/>
</rule>

<!-- Relax rules for automated tests -->
<rule ref="Drupal.Arrays.Array.LongLineDeclaration">
<exclude-pattern>tests/*</exclude-pattern>
Expand Down
Loading