Classes/NewFinalClassConstants: rename the sniff and other small updates by jrfnl · Pull Request #1496 · PHPCompatibility/PHPCompatibility

added 4 commits

April 18, 2023 05:53
As `final` constants can now (also) be used in traits and enums, I propose to remove the `Class` from the sniff name. The sniff will still be in the `Classes` category.

As this is a new sniff in PHPCompatibility 10.0.0, this is not a BC-break.

Includes a small tweak to the error message to also remove the `class` keyword from the message.
Throw the error on the `final` keyword instead of the `const` keyword. This will more clearly indicate the issue when people use the PHPCS `code` view.
The sniff already handles this correctly, no functional changes needed.
The sniff already handles this correctly, no changes needed.

wimg

wimg approved these changes Apr 20, 2023

@wimg wimg deleted the feature/classes-new-final-constants-update branch

April 20, 2023 13:22

@jrfnl jrfnl mentioned this pull request

Aug 14, 2023