Skip to content

Conversation

@simbig
Copy link
Contributor

@simbig simbig commented Jan 28, 2026

Summary

  • Adds PropertyNameIdToIDRule to check class property names for correct ID capitalization
  • Properties like $patientId will now be flagged and suggested to rename to $patientID
  • Follows the same pattern as existing VariableNameIdToIDRule, ParameterNameIdToIDRule, etc.
  • Uses PropertyProperty for backward compatibility with PHPStan 1.x (php-parser v4)
  • Adds ignore patterns for PHPStan 2.x deprecation warnings (TODO: remove when minimum PHPStan is ^2)

Test plan

  • Added property to existing test fixtures
  • Updated integration test expectations
  • All tests pass
  • PHPStan passes

🤖 Generated with Claude Code

@simbig simbig changed the title Add PropertyNameIdToIDRule for class property naming feat: Add PropertyNameIdToIDRule for class property naming Jan 28, 2026
@simbig simbig force-pushed the property-name-id-to-id-rule branch 5 times, most recently from cd0f05b to 59416b2 Compare January 28, 2026 09:22
Extends the Id → ID capitalization checking to class properties.
Previously only variables, parameters, methods, and class names
were checked.

Co-Authored-By: Claude (global.anthropic.claude-opus-4-5-20251101-v1:0) <noreply@anthropic.com>
@simbig simbig force-pushed the property-name-id-to-id-rule branch from 59416b2 to d83c63a Compare January 28, 2026 09:24
@simbig simbig requested a review from spawnia January 28, 2026 09:27
@spawnia spawnia merged commit deb7c56 into master Jan 28, 2026
30 checks passed
@spawnia spawnia deleted the property-name-id-to-id-rule branch January 28, 2026 09:50
@github-actions
Copy link

🎉 This PR is included in version 5.24.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants