Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]
php: [8.2, 8.3, 8.4]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}
Expand All @@ -24,7 +24,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-8-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
key: dependencies-laravel-12-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"license": "MIT",
"require": {
"php": "^8.2",
"illuminate/contracts": "^11.0",
"illuminate/support": "^11.0"
"illuminate/contracts": "^12.0",
"illuminate/support": "^12.0"
},
"require-dev": {
"laravel/framework": "^11.0",
"orchestra/testbench-core": "^9.0",
"phpunit/phpunit": "^10.5"
"laravel/framework": "^12.0",
"orchestra/testbench-core": "^10.0",
"phpunit/phpunit": "^11.0"
},
"autoload": {
"psr-4": {
Expand All @@ -40,7 +40,7 @@
},
"extra": {
"branch-alias": {
"dev-develop": "11.x-dev"
"dev-develop": "12.x-dev"
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @return string|bool
*/
function laravel_version(string $version = null) {
function laravel_version(?string $version = null) {
$appVersion = app()->version();

if (is_null($version)) {
Expand Down
21 changes: 19 additions & 2 deletions src/Validation/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

namespace Arcanedev\Support\Validation;

use Illuminate\Contracts\Validation\Rule as RuleContract;
use Closure;
use Illuminate\Contracts\Validation\ValidationRule;

/**
* Class Rule
Expand All @@ -14,7 +15,7 @@
* @deprecated Use the ValidationRule class instead.
* @see \Illuminate\Contracts\Validation\ValidationRule
*/
abstract class Rule implements RuleContract
abstract class Rule implements ValidationRule
{
/* -----------------------------------------------------------------
| Properties
Expand Down Expand Up @@ -57,6 +58,22 @@ public function message()
return $this->message;
}

/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Run the validation rule.
*
* @param string $attribute
* @param mixed $value
* @param \Closure $fail
*
* @return void
*/
abstract public function validate(string $attribute, mixed $value, Closure $fail): void;

/* -----------------------------------------------------------------
| Other Methods
| -----------------------------------------------------------------
Expand Down