Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 5, 2025

Composer: raise the minimum supported PHPCS + PHPCSUtils versions

PHP_CodeSniffer 3.13.3 + 3.13.4 and PHPCSUtils 1.1.2 have been released.
This commit raises the minimum supported PHPCS/Utils versions for improved PHP 8.4 support.

Note: while raising to 3.13.4 is not necessary from a functional point of view, 3.13.3 contains an issue which blocks the ability to run the tests, so we need 3.13.4 to safeguard the functionality of this external standard correctly.

Ref:

Universal/NoFQNTrueFalseNull: fix for changed tokenization in PHPCS 3.13.3 and 4.0

The tokenization of fully qualified true/false/null has been changed for both PHPCS 3.x (as of 3.13.3) as well as PHPCS 4.0.

The new tokenization means we don't need to take these tokens being tokenized as T_STRING or T_NAME_FULLY_QUALIFIED into account anymore, as long as the minimum supported PHPCS version will be PHPCS 3.13.3.

However, we now do need to verify that T_TRUE/T_FALSE/T_NULL tokens don't have a namespace separator included in their contents.

This commit updates the sniff for these changes.

Ref:

PHP_CodeSniffer 3.13.3 + 3.13.4 and PHPCSUtils 1.1.2 have been released.
This commit raises the minimum supported PHPCS/Utils versions for improved PHP 8.4 support.

Note: while raising to 3.13.4 is not necessary from a functional point of view, 3.13.3 contains an issue which blocks the ability to run the tests, so we need 3.13.4 to safeguard the functionality of this external standard correctly.

Ref:
* https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.1.2
* https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.13.3
* https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.13.4
….13.3 and 4.0

The tokenization of fully qualified `true`/`false`/`null` has been changed for both PHPCS 3.x (as of 3.13.3) as well as PHPCS 4.0.

The new tokenization means we don't need to take these tokens being tokenized as `T_STRING` or `T_NAME_FULLY_QUALIFIED` into account anymore, as long as the minimum supported PHPCS version will be PHPCS 3.13.3.

However, we now do need to verify that `T_TRUE`/`T_FALSE`/`T_NULL` tokens don't have a namespace separator included in their contents.

This commit updates the sniff for these changes.

Ref:
* PHPCSStandards/PHP_CodeSniffer 1201
* PHPCSStandards/PHP_CodeSniffer 1206
@jrfnl jrfnl added this to the 1.4.x Next milestone Sep 5, 2025
@jrfnl jrfnl merged commit 49c7c53 into develop Sep 5, 2025
74 checks passed
@jrfnl jrfnl deleted the feature/universal-nofqntruefalsenull-fix-for-phpcs-3.13.3-4.0 branch September 5, 2025 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant