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

Fix Laravel rule filtering #2800

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GeniJaho
Copy link

@GeniJaho GeniJaho commented Jan 9, 2025

When filtering the rules in the Find Rule page, the Laravel group only shows 38 rules, while there are 76 available at the moment. That happens because we only show and count the Laravel rules that belong to a set, as with the rest of the Rector groups.
That leaves out most of the Laravel rules.

In this PR we:

  • Add an exception when filtering by Group, to check if the rule class starts with RectorLaravel
  • Add RuleFilterTest to cover the edge case
  • Use dev-main for the Laravel Rector rules, since rules can be available before we do a release
  • Add the LARAVEL group name and replaces the string literal uses

Let me know please if this is OK or I need to change something.
And thank you for making the code open for the Rector website. 😄

@TomasVotruba
Copy link
Member

TomasVotruba commented Jan 9, 2025

Wow, this looks very good. Thanks for the test as well 🙏

I've made the CI run now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants