Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PHP 8.4 | Generic/[Lower|Upper]CaseConstant: add support for abstract properties #1185

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

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 12, 2025

Description

The Generic.PHP.LowerCaseConstant sniff is supposed to flag uppercase use of the true/false/nullconstants and its sister-sniffUpperCaseConstant` flags the lowercase variants. Both sniffs, however, are supposed to ignore the use of these keywords in type declarations - which may have their own rules.

This commit adds support for skipping over the types in PHP 8.4 abstract property declarations.

Includes tests.

Suggested changelog entry

Added support for PHP 8.4 abstract properties to the following sniffs:

  • Generic.PHP.LowerCaseConstant
  • Generic.PHP.UpperCaseConstant

Related issues/external references

Related to #734

... properties
The `Generic.PHP.LowerCaseConstant` sniff is supposed to flag uppercase use of the `true`/`false`/null` constants and its sister-sniff `UpperCaseConstant` flags the lowercase variants. Both sniffs, however, are supposed to **_ignore_** the use of these keywords in type declarations - which may have their own rules.
This commit adds support for skipping over the types in PHP 8.4 `abstract` property declarations.
Includes tests.
@jrfnl jrfnl added this to the 3.13.3 milestone Aug 12, 2025
@jrfnl jrfnl mentioned this pull request Jul 16, 2025
47 tasks
@jrfnl jrfnl merged commit 401a322 into master Aug 15, 2025
78 of 80 checks passed
@jrfnl jrfnl deleted the php-8.4/generic-loweruppercaseconstant-support-abstract-properties branch August 15, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

3.13.3

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /