Skip to content

Rename InvalidRuleConstructorException to InvalidValidatorException#1609

Merged
henriquemoody merged 1 commit intoRespect:mainfrom
henriquemoody:core/invalid_validator
Jan 18, 2026
Merged

Rename InvalidRuleConstructorException to InvalidValidatorException#1609
henriquemoody merged 1 commit intoRespect:mainfrom
henriquemoody:core/invalid_validator

Conversation

@henriquemoody
Copy link
Copy Markdown
Member

After renaming rules to validatores, it doesn't make sense to keep on having that exception. I renamed it to a more cleaner name, not mentioning the constructor because I think that if the constructor is not valid, the validator is not valid, hence the name I chose.

After renaming rules to validatores, it doesn't make sense to keep on
having that exception. I renamed it to a more cleaner name, not
mentioning the constructor because I think that if the constructor is
not valid, the validator is not valid, hence the name I chose.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.51%. Comparing base (8e5938a) to head (f820f89).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1609   +/-   ##
=========================================
  Coverage     97.51%   97.51%           
  Complexity     1006     1006           
=========================================
  Files           212      212           
  Lines          2334     2334           
=========================================
  Hits           2276     2276           
  Misses           58       58           

☔ 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request renames InvalidRuleConstructorException to InvalidValidatorException to align with the codebase's terminology shift from "rules" to "validators". The renaming improves code clarity and consistency throughout the validation library.

Changes:

  • Renamed the exception class from InvalidRuleConstructorException to InvalidValidatorException
  • Updated all 22 validator classes to import and throw the renamed exception
  • Updated all 23 test files to import and expect the renamed exception

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated no comments.

File Description
library/Exceptions/InvalidValidatorException.php Renamed exception class definition
library/Validators/*.php (22 files) Updated import statements and throw statements
tests/unit/Validators/*Test.php (22 files) Updated import statements and expectException calls
tests/unit/Exceptions/InvalidValidatorExceptionTest.php Updated test class name and references

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@henriquemoody henriquemoody merged commit f820f89 into Respect:main Jan 18, 2026
12 checks passed
@henriquemoody henriquemoody deleted the core/invalid_validator branch January 18, 2026 16:02
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