From 430d8c252c48872494161bd69838afcd4653e326 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 28 Mar 2024 14:28:56 -0700 Subject: [PATCH 01/14] Switch Acquia PHP to PSR12 --- src/Standards/AcquiaPHP/ruleset.xml | 109 ++-------------------------- 1 file changed, 6 insertions(+), 103 deletions(-) diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index 3041e70..3d52d32 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -8,23 +8,18 @@ Acquia's PHP coding standards. + + + + + - - - - - - - + - - - - @@ -33,10 +28,7 @@ - - - @@ -62,34 +54,6 @@ 0 - - 0 - - - - - - - 0 - - - 0 - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - @@ -163,52 +115,6 @@ 0 - - - - 0 - - - 0 - - - 0 - - - - - 0 - - - 0 - - - - 0 - - - 0 - - - - 0 - - - 0 - - - 0 - - - - - - - - 0 - @@ -226,7 +132,4 @@ - - - From e66e673bbd86a37842ad5098f00f50681fdaf938 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 28 Mar 2024 14:44:39 -0700 Subject: [PATCH 02/14] Add edge standards --- src/Standards/AcquiaEdge/ruleset.xml | 4 ---- src/Standards/AcquiaPHP/ruleset.xml | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Standards/AcquiaEdge/ruleset.xml b/src/Standards/AcquiaEdge/ruleset.xml index a848912..a1ccfae 100644 --- a/src/Standards/AcquiaEdge/ruleset.xml +++ b/src/Standards/AcquiaEdge/ruleset.xml @@ -11,8 +11,4 @@ - - - - diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index 3d52d32..387a16d 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -67,6 +67,8 @@ + + From 49a1d94f40c61a78e90119bcafa1997dfe64cbdb Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 28 Mar 2024 14:48:51 -0700 Subject: [PATCH 03/14] typo --- src/Standards/AcquiaPHP/ruleset.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index 387a16d..1b542a4 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -15,7 +15,7 @@ - + From 92d5cabc3eea58fed33100d141541e8f789523b4 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 28 Mar 2024 14:54:54 -0700 Subject: [PATCH 04/14] Add slevomat standards --- src/Standards/AcquiaPHP/ruleset.xml | 41 +++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index 1b542a4..d9060b9 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -15,6 +15,7 @@ + @@ -67,15 +68,39 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -130,7 +155,7 @@ - + From d484975664e5dfff154782681f5c8a3008bf372e Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 28 Mar 2024 14:59:47 -0700 Subject: [PATCH 05/14] fix test --- .github/script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/script.sh b/.github/script.sh index a14b641..9dd93d9 100755 --- a/.github/script.sh +++ b/.github/script.sh @@ -54,7 +54,7 @@ if [[ "$FAILURES" ]]; then fi # Place a good test file. -printf " good.php +printf " good.php # Test that the SUT's standards can be run. EXPECTED=( From 94d545ed8101b77b2ff41a903dae9dddc570a5f4 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 28 Mar 2024 15:09:15 -0700 Subject: [PATCH 06/14] fix tests --- .github/script.sh | 2 +- composer.lock | 219 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 154 insertions(+), 67 deletions(-) diff --git a/.github/script.sh b/.github/script.sh index 9dd93d9..da7f39b 100755 --- a/.github/script.sh +++ b/.github/script.sh @@ -54,7 +54,7 @@ if [[ "$FAILURES" ]]; then fi # Place a good test file. -printf " good.php +printf " good.php # Test that the SUT's standards can be run. EXPECTED=( diff --git a/composer.lock b/composer.lock index be055c2..680a20a 100644 --- a/composer.lock +++ b/composer.lock @@ -86,30 +86,30 @@ }, { "name": "drupal/coder", - "version": "8.3.18", + "version": "8.3.23", "source": { "type": "git", "url": "https://github.com/pfrenssen/coder.git", - "reference": "d5911f812b69ca3bda5524899bdd06b3b4e687ff" + "reference": "1a1613d83c08dac5be593f2775c9eccae1b41805" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pfrenssen/coder/zipball/d5911f812b69ca3bda5524899bdd06b3b4e687ff", - "reference": "d5911f812b69ca3bda5524899bdd06b3b4e687ff", + "url": "https://api.github.com/repos/pfrenssen/coder/zipball/1a1613d83c08dac5be593f2775c9eccae1b41805", + "reference": "1a1613d83c08dac5be593f2775c9eccae1b41805", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1 || ^1.0.0", "ext-mbstring": "*", - "php": ">=7.1", + "php": ">=7.2", "sirbrillig/phpcs-variable-analysis": "^2.11.7", - "slevomat/coding-standard": "^7.0 || ^8.0", + "slevomat/coding-standard": "^8.11", "squizlabs/php_codesniffer": "^3.7.1", "symfony/yaml": ">=3.4.0" }, "require-dev": { "phpstan/phpstan": "^1.7.12", - "phpunit/phpunit": "^7.0 || ^8.0" + "phpunit/phpunit": "^8.0" }, "type": "phpcodesniffer-standard", "autoload": { @@ -133,7 +133,7 @@ "issues": "https://www.drupal.org/project/issues/coder", "source": "https://www.drupal.org/project/coder" }, - "time": "2023-04-18T12:07:59+00:00" + "time": "2024-01-27T18:13:12+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -199,22 +199,24 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.20.4", + "version": "1.27.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd" + "reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/86e4d5a4b036f8f0be1464522f4c6b584c452757", + "reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.5", @@ -238,22 +240,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.4" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.27.0" }, - "time": "2023-05-02T09:19:37+00:00" + "time": "2024-03-21T13:14:53+00:00" }, { "name": "sirbrillig/phpcs-variable-analysis", - "version": "v2.11.16", + "version": "v2.11.17", "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88" + "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/dc5582dc5a93a235557af73e523c389aac9a8e88", - "reference": "dc5582dc5a93a235557af73e523c389aac9a8e88", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/3b71162a6bf0cde2bff1752e40a1788d8273d049", + "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049", "shasum": "" }, "require": { @@ -298,36 +300,36 @@ "source": "https://github.com/sirbrillig/phpcs-variable-analysis", "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" }, - "time": "2023-03-31T16:46:32+00:00" + "time": "2023-08-05T23:46:11+00:00" }, { "name": "slevomat/coding-standard", - "version": "8.12.1", + "version": "8.15.0", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "f69e2524e8770efb9b3e5ac4a0ebc0d54eb446d7" + "reference": "7d1d957421618a3803b593ec31ace470177d7817" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/f69e2524e8770efb9b3e5ac4a0ebc0d54eb446d7", - "reference": "f69e2524e8770efb9b3e5ac4a0ebc0d54eb446d7", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/7d1d957421618a3803b593ec31ace470177d7817", + "reference": "7d1d957421618a3803b593ec31ace470177d7817", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": ">=1.20.0 <1.21.0", - "squizlabs/php_codesniffer": "^3.7.1" + "phpstan/phpdoc-parser": "^1.23.1", + "squizlabs/php_codesniffer": "^3.9.0" }, "require-dev": { "phing/phing": "2.17.4", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.10.15", - "phpstan/phpstan-deprecation-rules": "1.1.3", - "phpstan/phpstan-phpunit": "1.3.11", - "phpstan/phpstan-strict-rules": "1.5.1", - "phpunit/phpunit": "7.5.20|8.5.21|9.6.8|10.1.3" + "phpstan/phpstan": "1.10.60", + "phpstan/phpstan-deprecation-rules": "1.1.4", + "phpstan/phpstan-phpunit": "1.3.16", + "phpstan/phpstan-strict-rules": "1.5.2", + "phpunit/phpunit": "8.5.21|9.6.8|10.5.11" }, "type": "phpcodesniffer-standard", "extra": { @@ -351,7 +353,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.12.1" + "source": "https://github.com/slevomat/coding-standard/tree/8.15.0" }, "funding": [ { @@ -363,20 +365,20 @@ "type": "tidelift" } ], - "time": "2023-05-15T21:42:25+00:00" + "time": "2024-03-09T15:20:58+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.9.0", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b", + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b", "shasum": "" }, "require": { @@ -386,11 +388,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -405,35 +407,125 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-02-16T15:06:51+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -447,9 +539,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -486,7 +575,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -502,34 +591,32 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/yaml", - "version": "v6.2.10", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "61916f3861b1e9705b18cfde723921a71dd1559d" + "reference": "d75715985f0f94f978e3a8fa42533e10db921b90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/61916f3861b1e9705b18cfde723921a71dd1559d", - "reference": "61916f3861b1e9705b18cfde723921a71dd1559d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d75715985f0f94f978e3a8fa42533e10db921b90", + "reference": "d75715985f0f94f978e3a8fa42533e10db921b90", "shasum": "" }, "require": { "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "symfony/console": "^5.4|^6.0|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -560,7 +647,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.2.10" + "source": "https://github.com/symfony/yaml/tree/v6.4.3" }, "funding": [ { @@ -576,7 +663,7 @@ "type": "tidelift" } ], - "time": "2023-04-28T13:25:36+00:00" + "time": "2024-01-23T14:51:35+00:00" } ], "packages-dev": [], @@ -587,5 +674,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From 7d9894a51a1e1b01915d92a915826f3a079e47b5 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 28 Mar 2024 15:12:47 -0700 Subject: [PATCH 07/14] fix tests --- .github/script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/script.sh b/.github/script.sh index da7f39b..f375361 100755 --- a/.github/script.sh +++ b/.github/script.sh @@ -54,7 +54,7 @@ if [[ "$FAILURES" ]]; then fi # Place a good test file. -printf " good.php +printf " good.php # Test that the SUT's standards can be run. EXPECTED=( From a78ddaa1527f1988688e8a6710484598e4092974 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 28 Mar 2024 15:27:27 -0700 Subject: [PATCH 08/14] fix tsets --- .github/script.sh | 2 +- src/Standards/AcquiaPHP/ruleset.xml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/script.sh b/.github/script.sh index f375361..da7f39b 100755 --- a/.github/script.sh +++ b/.github/script.sh @@ -54,7 +54,7 @@ if [[ "$FAILURES" ]]; then fi # Place a good test file. -printf " good.php +printf " good.php # Test that the SUT's standards can be run. EXPECTED=( diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index d9060b9..c3c7e9d 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -92,7 +92,13 @@ - + + + + + + + From 51835ae5b6feff87edf544d38708ed388f0ccf20 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Fri, 29 Mar 2024 16:21:16 -0700 Subject: [PATCH 09/14] Fix class declaration --- src/Standards/AcquiaPHP/ruleset.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index c3c7e9d..4b32bfa 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -11,6 +11,8 @@ + + From 3dad619d8ca0fe6990626581cfe3acced7ddf1f6 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Fri, 29 Mar 2024 20:09:03 -0700 Subject: [PATCH 10/14] fix function declarations --- src/Standards/AcquiaPHP/ruleset.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index 4b32bfa..0e2fd36 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -8,11 +8,13 @@ Acquia's PHP coding standards. + + @@ -150,6 +152,23 @@ 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + From b2d409a02c26f7794d157d93268289bf3fd727f6 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Mon, 1 Apr 2024 08:42:34 -0700 Subject: [PATCH 11/14] functioncallsignature --- src/Standards/AcquiaPHP/ruleset.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index 0e2fd36..7661733 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -13,10 +13,17 @@ + + + + + + + From 9105771603c936e47bf25a425b1e8c6b9f9b5a48 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Mon, 1 Apr 2024 09:08:20 -0700 Subject: [PATCH 12/14] control structure spacing --- src/Standards/AcquiaPHP/ruleset.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index 7661733..28e1c0b 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -67,6 +67,13 @@ 0 + + + + + + + + From 3b802da6c9c9628c0455f5af91f76d7aaa21f6aa Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Mon, 1 Apr 2024 11:02:30 -0700 Subject: [PATCH 14/14] cleanup --- README.md | 6 +- src/Standards/AcquiaDrupalStrict/ruleset.xml | 3 - .../AcquiaDrupalTransitional/ruleset.xml | 3 - src/Standards/AcquiaPHP/ruleset.xml | 78 +++++++------------ 4 files changed, 32 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index d59b7ff..834f71b 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ Acquia Coding Standards for PHP includes a selection of sniffs from the followin Rules are split into rulesets according to the project language and framework: -* [AcquiaPHP](src/Standards/AcquiaPHP/ruleset.xml) contains sniffs applicable to all PHP projects. -* [AcquiaDrupalStrict](src/Standards/AcquiaDrupalStrict/ruleset.xml) incorporates AcquiaPHP and adds all Drupal coding standards and best practices sniffs. Recommended for new Drupal projects and teams familiar with Drupal coding standards. -* [AcquiaDrupalTransitional](src/Standards/AcquiaDrupalTransitional/ruleset.xml) incorporates AcquiaPHP and adds Drupal core's own phpcs configuration, which is less strict than the official standards. Recommended for legacy Drupal codebases or teams new to Drupal coding standards. +* [AcquiaPHP](src/Standards/AcquiaPHP/ruleset.xml) is the preferred standard for all Acquia projects, including Drupal projects. It is based on PSR-12 and compatible with Drupal standards. In other words, any code meeting the AcquiaPHP standard will also meet Drupal standards, but will take advantage of new language features offered by PSR-12 and (soon) PER-2. +* [AcquiaDrupalStrict](src/Standards/AcquiaDrupalStrict/ruleset.xml) is based on Drupal coding standards and best practices sniffs. Recommended for legacy Drupal projects and teams familiar with Drupal coding standards that don't want to use the stricter AcquiaPHP standard. +* [AcquiaDrupalTransitional](src/Standards/AcquiaDrupalTransitional/ruleset.xml) is based on Drupal core's own phpcs configuration, which is less strict than the official standards. Recommended for legacy Drupal codebases or teams new to Drupal coding standards. * [AcquiaEdge](src/Standards/AcquiaEdge/ruleset.xml) incorporates AcquiaPHP and adds backwards-incompatible sniffs that will be included in AcquiaPHP with the next major release of this package. ## Installation & usage diff --git a/src/Standards/AcquiaDrupalStrict/ruleset.xml b/src/Standards/AcquiaDrupalStrict/ruleset.xml index 841ee38..00e045b 100644 --- a/src/Standards/AcquiaDrupalStrict/ruleset.xml +++ b/src/Standards/AcquiaDrupalStrict/ruleset.xml @@ -32,7 +32,4 @@ - - - diff --git a/src/Standards/AcquiaDrupalTransitional/ruleset.xml b/src/Standards/AcquiaDrupalTransitional/ruleset.xml index eb1d07e..8954332 100644 --- a/src/Standards/AcquiaDrupalTransitional/ruleset.xml +++ b/src/Standards/AcquiaDrupalTransitional/ruleset.xml @@ -32,7 +32,4 @@ - - - diff --git a/src/Standards/AcquiaPHP/ruleset.xml b/src/Standards/AcquiaPHP/ruleset.xml index f34553b..26e1b0f 100644 --- a/src/Standards/AcquiaPHP/ruleset.xml +++ b/src/Standards/AcquiaPHP/ruleset.xml @@ -10,25 +10,21 @@ - + + + - + - - - - - - - + @@ -55,26 +51,6 @@ - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -130,10 +125,7 @@ - - - - + 0 @@ -168,22 +160,10 @@ 0 - - - 0 - - - 0 - - - - 0 - - - 0 - - - 0 + + + +