From eeaa1fe59598b91fcbf5c363b101a73d29cc338f Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 21 Apr 2025 00:35:08 +0200 Subject: [PATCH] Composer: raise the minimum supported PHPCS version to 3.12.1 ... which is the latest release containing tokenizer changes. Includes removing some code which has become redundant after upstream PR PHPCSStandards/PHP_CodeSniffer 647 was merged (included in 3.11.0). --- README.md | 2 +- .../Sniffs/WhiteSpace/DisallowInlineTabsSniff.php | 10 ---------- composer.json | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c617f8ea..49a21206 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Minimum Requirements ------------------------------------------- * PHP 5.4 or higher. -* [PHP_CodeSniffer][phpcs-gh] version **3.8.0** or higher. +* [PHP_CodeSniffer][phpcs-gh] version **3.12.1** or higher. * [PHPCSUtils][phpcsutils-gh] version **1.0.9** or higher. diff --git a/Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php b/Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php index 77d15d00..c94934f1 100644 --- a/Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php +++ b/Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php @@ -150,16 +150,6 @@ public function process(File $phpcsFile, $stackPtr) } } - /* - * For "yield from", we should only handle tabs _between_ the keywords (single token), - * not indentation for those situations where the keyword is split in multiple tokens. - */ - if ($tokens[$i]['code'] === \T_YIELD_FROM - && \preg_match('`^yield.+from$`i', $tokens[$i]['content']) !== 1 - ) { - continue; - } - $fix = $phpcsFile->addFixableError( 'Spaces must be used for mid-line alignment; tabs are not allowed', $i, diff --git a/composer.json b/composer.json index 28617b0d..b565df6a 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "require" : { "php" : ">=5.4", - "squizlabs/php_codesniffer" : "^3.8.0", + "squizlabs/php_codesniffer" : "^3.12.1", "phpcsstandards/phpcsutils" : "^1.0.9" }, "require-dev" : {