Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ad1ff55
Bump dependencies for Laravel 13 compatibility
navneetkumar-pim-webkul May 26, 2026
87af947
Upgrade phpunit.xml to PHPUnit 11/12 schema
navneetkumar-pim-webkul May 26, 2026
67e874a
Loosen phpunit failOn flags for cross-version deprecation tolerance
navneetkumar-pim-webkul May 26, 2026
165bc98
Add Orchestra Testbench base test case
navneetkumar-pim-webkul May 26, 2026
cc6e741
Add test coverage for LaravelValidator public API
navneetkumar-pim-webkul May 26, 2026
0aea284
Replace Travis CI with GitHub Actions matrix
navneetkumar-pim-webkul May 26, 2026
e460cd9
Document Laravel 13 support in README
navneetkumar-pim-webkul May 26, 2026
9ad3888
Drop unused mockery/mockery dev dependency
navneetkumar-pim-webkul May 26, 2026
017e1ab
Exclude PHP 8.4 + Laravel 10 from CI matrix (unsupported combo)
navneetkumar-pim-webkul May 26, 2026
3b43938
Modernize source for PHP 8.2 / Laravel 13
navneetkumar-pim-webkul May 26, 2026
4449b0c
Expand test coverage for fresh instance and exception payload
navneetkumar-pim-webkul May 26, 2026
feb32ca
Drop Laravel 10 support (EOL Feb 2026, incompatible with PHPUnit 11+)
navneetkumar-pim-webkul May 26, 2026
3676aa7
Preserve empty exception message for backward compatibility
navneetkumar-pim-webkul May 26, 2026
2e2db84
Add regression tests for unique-rule rewriter edge cases
navneetkumar-pim-webkul May 26, 2026
75d10b8
Document breaking changes in README
navneetkumar-pim-webkul May 26, 2026
b73a1fb
Address Copilot review feedback
navneetkumar-pim-webkul May 27, 2026
3d80491
Merge remote-tracking branch 'upstream/master' into laravel-13-compat…
navneetkumar-pim-webkul May 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: tests

on:
push:
branches: [master, main]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']
laravel: ['11.*', '12.*', '13.*']
exclude:
- php: '8.2'
laravel: '13.*'
Comment thread
navneetkumar-pim-webkul marked this conversation as resolved.

name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Install dependencies
run: |
composer require "illuminate/support:${{ matrix.laravel }}" "illuminate/validation:${{ matrix.laravel }}" --no-update --no-interaction
composer update --prefer-stable --prefer-dist --no-interaction

- name: Run tests
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/vendor
composer.phar
.DS_Store
/.phpunit.cache
### Composer template
vendor/

Expand Down
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,25 @@

## Installation

Add "prettus/laravel-repository": "1.1.*" to composer.json

This package supports Laravel 11, 12, and 13 on PHP 8.2+ (PHP 8.3+ required for Laravel 13).

### Breaking changes vs prior releases

- `ValidatorInterface` and `AbstractValidator` now declare typed parameters and return types. Subclasses or interface implementations must update their method signatures.
- `ValidatorException::getMessageBag()` returns `Illuminate\Contracts\Support\MessageBag` (the contract) instead of the concrete `Illuminate\Support\MessageBag`.
- Custom subclasses of `AbstractValidator` that override `__construct()` must call `parent::__construct()` so the internal `$errors` `MessageBag` is initialized.
- Laravel 5.4–10 are no longer supported. Stay on a prior release if you still target those versions.

Add `prettus/laravel-validation` to your `composer.json`:

```json
"prettus/laravel-validation": "1.1.*"
"prettus/laravel-validation": "^2.0"
```

Or install via Composer:

```bash
composer require prettus/laravel-validation
```

### Create a validator
Expand Down
18 changes: 15 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,26 @@
"docs": "http://andersao.github.io/laravel-validation"
},
"require": {
"php": ">=5.4.0",
"illuminate/support": "~5.4|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0",
"illuminate/validation": "~5.4|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0"
"php": "^8.2",
"illuminate/support": "^11.0|^12.0|^13.0",
"illuminate/validation": "^11.0|^12.0|^13.0"
},
"require-dev": {
"phpunit/phpunit": "^11.0|^12.0",
"orchestra/testbench": "^9.0|^10.0|^11.0"
},
"scripts": {
"test": "phpunit"
},
"autoload": {
"psr-4": {
"Prettus\\Validator\\": "src/Prettus/Validator/"
}
},
"autoload-dev": {
"psr-4": {
"Prettus\\Validator\\Tests\\": "tests/"
}
},
"minimum-stability": "stable"
}
Loading