Skip to content

added Not have attribute expression#615

Merged
AlessandroMinoccheri merged 1 commit into
mainfrom
feature/add-not-have-attribute-expression
May 22, 2026
Merged

added Not have attribute expression#615
AlessandroMinoccheri merged 1 commit into
mainfrom
feature/add-not-have-attribute-expression

Conversation

@AlessandroMinoccheri
Copy link
Copy Markdown
Member

Summary
Adds NotHaveAttribute, the missing negative counterpart to HaveAttribute, following the same pattern used by every other expression pair in the codebase (HaveTrait/NotHaveTrait, Implement/NotImplement, etc.).

This allows rules like:

php$rules[] = Rule::allClasses()
    ->that(new ResideInOneOfTheseNamespaces('App\Controller'))
    ->should(new NotHaveAttribute('Deprecated'))
    ->because('deprecated controllers should be removed, not kept in production');

Notes
No breaking changes. No new dependencies.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.33%. Comparing base (44d3a4a) to head (6d92b91).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #615      +/-   ##
============================================
+ Coverage     98.32%   98.33%   +0.01%     
- Complexity      689      693       +4     
============================================
  Files            86       87       +1     
  Lines          1968     1981      +13     
============================================
+ Hits           1935     1948      +13     
  Misses           33       33              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlessandroMinoccheri AlessandroMinoccheri added the enhancement New feature or request label May 22, 2026
@AlessandroMinoccheri AlessandroMinoccheri self-assigned this May 22, 2026
Copy link
Copy Markdown
Collaborator

@fain182 fain182 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙂

Comment thread README.md Outdated
@AlessandroMinoccheri AlessandroMinoccheri force-pushed the feature/add-not-have-attribute-expression branch from 970849f to 6d92b91 Compare May 22, 2026 15:10
@AlessandroMinoccheri AlessandroMinoccheri merged commit 8968da5 into main May 22, 2026
35 checks passed
@AlessandroMinoccheri AlessandroMinoccheri deleted the feature/add-not-have-attribute-expression branch May 22, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants