Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 30, 2025

Composer: raise the minimum supported PHPCS to 4.0.1

... to benefit from a tokenizer bug fix where a PHP close tag would not be recognized as a statement closer for a case/default statement.

Includes updating references to the PHPCS version whenever relevant throughout the codebase.

Ref:

PHP 8.5 | ✨ New PHPCompatibility.ControlStructures.RemovedTerminatingCaseWithSemicolon sniff (RFC)

. Terminating case statements with a semicolon instead of a colon has
been deprecated.
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_semicolon_after_case_in_switch_statement

This commit adds a new sniff to detect and auto-fix this issue.

Includes tests.
Includes fixer (manually tested as the test framework does not allow for testing this currently).
Includes documentation.

Refs:

Related to #1849

... to benefit from a tokenizer bug fix where a PHP close tag would not be recognized as a statement closer for a `case`/`default` statement.

Includes updating references to the PHPCS version whenever relevant throughout the codebase.

Ref:
* https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/4.0.1
@wimg wimg merged commit 3a1fe94 into develop Nov 30, 2025
48 checks passed
@wimg wimg deleted the php-8.5/new-removedterminatingcasewithsemicolon-sniff branch November 30, 2025 20:31
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.

3 participants