Composer: raise the minimum supported PHPCS + PHPCSUtils versions + fix test failures by jrfnl · Pull Request #1806 · PHPCompatibility/PHPCompatibility
added 4 commits
July 5, 2025 23:02…er needed PHPCS 3.12.2 fixed a PHP tokenization inconsistency directly related to what this sniff is detecting. > - Tokenizer/PHP: a PHP open tag at the very end of a file will now always be tokenized as T_OPEN_TAG, independently of the PHP version. > Previously, a PHP open tag at the end of a file was not tokenized as an open tag on PHP < 7.4 and the tokenization would depend on the short_open_tag setting. As the PHPCS tokenization will now be the same PHP cross-version, we can remove the work-arounds which were in place to accommodate the previous difference in tokenization. Ref: * PHPCSStandards/PHP_CodeSniffer 937
…ial exception The following PHPCSUtils 1.1.0 change was causing the tests to fail: > `UseStatements::getType()` will now handle unfinished closure `use` statements (parse errors) more consistently and return `'closure'` for those cases. This change means that during live coding, in specific cases where a closure declaration is incomplete, the `UseStatements::getType()` method will still correctly detect the `use` as a closure `use`. However, the `FunctionDeclarations::getParameters()` method will not handle such incomplete code and will throw an exception as the parameters imported via the closure `use` cannot be reliably retrieved. Fixed now by catching this potential exception.
This was referenced
Jul 5, 2025wimg approved these changes Jul 6, 2025
wimg
deleted the
feature/composer-update-for-phpcsutils-1.1.0
branch
This was referenced
Jul 6, 2025
jrfnl
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters