Rename InvalidRuleConstructorException to InvalidValidatorException#1609
Merged
henriquemoody merged 1 commit intoRespect:mainfrom Jan 18, 2026
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
InvalidRuleConstructorExceptiontoInvalidValidatorException - 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.