Remove mathematical, niche and deprecated validators#1648
Merged
alganet merged 1 commit intoRespect:mainfrom Jan 30, 2026
Merged
Remove mathematical, niche and deprecated validators#1648alganet merged 1 commit intoRespect:mainfrom
alganet merged 1 commit intoRespect:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1648 +/- ##
============================================
+ Coverage 99.14% 99.21% +0.06%
+ Complexity 962 927 -35
============================================
Files 197 190 -7
Lines 2215 2153 -62
============================================
- Hits 2196 2136 -60
+ Misses 19 17 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR removes seven validators identified as mathematical, niche, or deprecated according to issue #1642. The changes include removing validator classes, their tests, documentation, and updating all references throughout the codebase.
Changes:
- Removed seven validators:
VideoUrl,Uploaded,PrimeNumber,PhpLabel,PerfectSquare,FilterVar, andFibonacci - Refactored
Urlvalidator to usefilter_vardirectly instead of wrapping the removedFilterVarvalidator - Removed
tests/bootstrap.phpwhich was only needed for mockingis_uploaded_fileinUploadedvalidator tests - Updated migration guide with replacement recommendations for removed validators
Reviewed changes
Copilot reviewed 59 out of 59 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Validators/*.php | Removed 7 validator classes |
| src/Validators/Url.php | Refactored to extend Simple and use filter_var directly |
| tests/unit/Validators/*.php | Removed unit tests for deleted validators |
| tests/feature/Validators/*.php | Removed feature tests for deleted validators |
| tests/bootstrap.php | Removed file (no longer needed) |
| tests/src/SmokeTestProvider.php | Removed references to deleted validators |
| tests/feature/SerializableTest.php | Removed mock setup for Uploaded validator |
| tests/feature/Validators/DateTimeDiffTest.php | Replaced PrimeNumber with Positive in tests |
| tests/benchmark/ValidatorBench.php | Removed mock setup for Uploaded validator |
| src/Mixins/*.php | Removed methods for deleted validators from all mixin interfaces (12 files) |
| phpunit.xml.dist | Updated bootstrap path from tests/bootstrap.php to vendor/autoload.php |
| phpcs.xml.dist | Removed exclusion patterns for deleted tests/bootstrap.php |
| phpbench.json.dist | Updated bootstrap path from tests/bootstrap.php to vendor/autoload.php |
| docs/validators/*.md | Removed documentation for deleted validators (7 files) |
| docs/validators.md | Removed references to deleted validators from all categorizations and lists |
| docs/migrating-from-v2-to-v3.md | Added migration guidance for removed validators (contains errors) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This commit removes validators described in Respect#1642, refactoring to clean up after their removal. - Url was refactored to use the function `filter_var` instead. - tests/bootstrap.php is no longer needed and was removed. - Updated migration guide with recommendations for replacements.
8d9b320 to
c517861
Compare
henriquemoody
approved these changes
Jan 30, 2026
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.
This commit removes validators described in #1642, refactoring to clean up after their removal.
filter_varinstead.