Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.3 | Generic/LowerCaseConstant: add support for typed constants #330

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Feb 8, 2024

Description

Type declarations are explicitly not checked by this sniff.

PHP 8.3 introduces typed constants. This means that the sniff now also needs to ensure that it doesn't flag non-lowercase true/false/null in the type declaration for a constant.

Fixed now. Includes tests.

Suggested changelog entry

  • Generic.PHP.LowerCaseConstant : support for typed class constants

Related issues/external references

Related to #106

Types of changes

  • New feature (non-breaking change which adds functionality)

@jrfnl
Copy link
Member Author

jrfnl commented Feb 14, 2024

Unless there are objections/someone leaves a comments on this PR, I will merge this tomorrow.

Type declarations are explicitly not checked by this sniff.

PHP 8.3 introduces typed constants. This means that the sniff now also needs to ensure that it doesn't flag non-lowercase `true`/`false`/`null` in the type declaration for a constant.

Fixed now. Includes tests.
@jrfnl jrfnl force-pushed the php-8.3/generic-lowercaseconstant-support-typed-constants branch from b65551d to 35abfb0 Compare February 15, 2024 13:19
@jrfnl
Copy link
Member Author

jrfnl commented Feb 15, 2024

Rebased without changes. Merging once the build passes.

@jrfnl jrfnl merged commit 1969478 into master Feb 15, 2024
44 checks passed
@jrfnl jrfnl deleted the php-8.3/generic-lowercaseconstant-support-typed-constants branch February 15, 2024 13:55
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.

None yet

1 participant