From 9afda4123600b16dad1e6ea064246f6358c7971f Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 9 Dec 2023 05:09:02 +0100 Subject: [PATCH] Revert "replace squizlabs/php_codesniffer with phpcsstandards/php_codesniffer" This reverts commit 271394724bf57dd77819f766c450d5543d9c9ab3. See: https://github.com/slevomat/coding-standard/pull/1641#issuecomment-1843958153 Also: https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.8.0 --- README.md | 4 ++-- build/PHPStan/phpstan.neon | 4 ++-- build/phpcs.xml | 2 +- composer.json | 2 +- tests/bootstrap.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fff7b04cc..c13bde58a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Code coverage](https://codecov.io/gh/slevomat/coding-standard/branch/master/graph/badge.svg)](https://codecov.io/gh/slevomat/coding-standard) ![PHPStan](https://img.shields.io/badge/style-level%207-brightgreen.svg?&label=phpstan) -Slevomat Coding Standard for [PHP_CodeSniffer](https://github.com/phpcsstandards/PHP_CodeSniffer) provides sniffs that fall into three categories: +Slevomat Coding Standard for [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) provides sniffs that fall into three categories: * Functional - improving the safety and behaviour of code * Cleaning - detecting dead code @@ -249,7 +249,7 @@ However it is not a recommended way to use Slevomat Coding Standard, because you ## Fixing errors automatically -Sniffs in this standard marked by the 🔧 symbol support [automatic fixing of coding standard violations](https://github.com/phpcsstandards/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically). To fix your code automatically, run phpcbf instead of phpcs: +Sniffs in this standard marked by the 🔧 symbol support [automatic fixing of coding standard violations](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically). To fix your code automatically, run phpcbf instead of phpcs: ``` vendor/bin/phpcbf --standard=ruleset.xml --extensions=php --tab-width=4 -sp src tests diff --git a/build/PHPStan/phpstan.neon b/build/PHPStan/phpstan.neon index dae352a50..ef8b16809 100644 --- a/build/PHPStan/phpstan.neon +++ b/build/PHPStan/phpstan.neon @@ -12,8 +12,8 @@ parameters: - %currentWorkingDirectory%/SlevomatCodingStandard bootstrapFiles: - - %currentWorkingDirectory%/vendor/phpcsstandards/php_codesniffer/autoload.php - - %currentWorkingDirectory%/vendor/phpcsstandards/php_codesniffer/src/Util/Tokens.php + - %currentWorkingDirectory%/vendor/squizlabs/php_codesniffer/autoload.php + - %currentWorkingDirectory%/vendor/squizlabs/php_codesniffer/src/Util/Tokens.php excludePaths: - %currentWorkingDirectory%/tests/*/data/* ignoreErrors: diff --git a/build/phpcs.xml b/build/phpcs.xml index fc28a14b9..929551e3f 100644 --- a/build/phpcs.xml +++ b/build/phpcs.xml @@ -1,5 +1,5 @@ - + diff --git a/composer.json b/composer.json index a3dd1d08f..670f865e0 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "php": "^7.2 || ^8.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "phpstan/phpdoc-parser": "^1.23.1", - "phpcsstandards/php_codesniffer": "^3.7.1" + "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { "phing/phing": "2.17.4", diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 009b1a557..d783176bd 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -3,4 +3,4 @@ error_reporting(E_ALL); require __DIR__ . '/../vendor/autoload.php'; -require __DIR__ . '/../vendor/phpcsstandards/php_codesniffer/autoload.php'; +require __DIR__ . '/../vendor/squizlabs/php_codesniffer/autoload.php';