Add Laravel 13 support#109
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the package description and dependency constraints in composer.json to include support for Laravel 13. Feedback indicates that these changes are premature since Laravel 13 has not yet been released, and including these versions will lead to dependency resolution failures for users and CI environments.
| { | ||
| "name": "iamfarhad/validation", | ||
| "description": "🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes & more. Modern Laravel 10-12 support with both ValidationRule objects & string-based rules.", | ||
| "description": "🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes & more. Modern Laravel 10-13 support with both ValidationRule objects & string-based rules.", |
There was a problem hiding this comment.
Claiming support for Laravel 13 is premature. Laravel 12 is the next major version (expected Q1 2025), and Laravel 13 is not expected until 2026. Including it in the description may be misleading as it cannot be verified yet.
| "description": "🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes & more. Modern Laravel 10-13 support with both ValidationRule objects & string-based rules.", | |
| "description": "🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes & more. Modern Laravel 10-12 support with both ValidationRule objects & string-based rules.", |
| "illuminate/support": "^10.0|^11.0|^12.0|^13.0", | ||
| "illuminate/validation": "^10.0|^11.0|^12.0|^13.0" |
There was a problem hiding this comment.
Adding ^13.0 for illuminate dependencies is premature. These versions do not exist yet and cannot be tested. This will cause dependency resolution errors in CI and for users attempting to update, as the author noted that local tests were not run. It is recommended to remove these until the versions are actually available.
| "illuminate/support": "^10.0|^11.0|^12.0|^13.0", | |
| "illuminate/validation": "^10.0|^11.0|^12.0|^13.0" | |
| "illuminate/support": "^10.0|^11.0|^12.0", | |
| "illuminate/validation": "^10.0|^11.0|^12.0" |
| "require-dev": { | ||
| "phpunit/phpunit": "^10.0|^11.0|^12.0", | ||
| "orchestra/testbench": "^8.0|^9.0|^10.0", | ||
| "orchestra/testbench": "^8.0|^9.0|^10.0|^11.0", |
There was a problem hiding this comment.
Summary
^13.0) support forilluminate/supportandilluminate/validationNotes
Laravel 13 requires PHP 8.3+, but the package-level PHP requirement remains
^8.1so existing Laravel 10-12 users are not blocked. Composer will still enforce PHP 8.3+ when Laravel 13 dependencies are selected.Testing
github.comfor cloning the repository.Note
Low Risk
Low risk: only widens dependency constraints and CI test matrix; no runtime logic changes, with potential risk limited to version-constraint/resolution issues.
Overview
Adds Laravel 13 compatibility by widening
illuminate/supportandilluminate/validationconstraints to include^13.0and updating the package description accordingly.Expands GitHub Actions CI to test against
laravel: 13.*, wiring it toorchestra/testbench: 11.*and excluding unsupported PHP/Laravel combinations (Laravel 13 not run on PHP 8.1/8.2).Reviewed by Cursor Bugbot for commit 3026bbd. Configure here.