From ad1ff555ea87a220c4cea1966e15085836a845c8 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 14:33:55 +0530 Subject: [PATCH 01/16] Bump dependencies for Laravel 13 compatibility --- composer.json | 14 +- composer.lock | 1886 ------------------------------------------------- 2 files changed, 11 insertions(+), 1889 deletions(-) delete mode 100644 composer.lock diff --git a/composer.json b/composer.json index 6cce22e..01b6725 100644 --- a/composer.json +++ b/composer.json @@ -23,9 +23,17 @@ "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", - "illuminate/validation": "~5.4|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0" + "php": "^8.2", + "illuminate/support": "^10.0|^11.0|^12.0|^13.0", + "illuminate/validation": "^10.0|^11.0|^12.0|^13.0" + }, + "require-dev": { + "phpunit/phpunit": "^11.0|^12.0", + "orchestra/testbench": "^8.0|^9.0|^10.0|^11.0", + "mockery/mockery": "^1.6" + }, + "scripts": { + "test": "phpunit" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 52c7e0f..0000000 --- a/composer.lock +++ /dev/null @@ -1,1886 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "a6f9c2b81af477a489c75fbbb4702129", - "packages": [ - { - "name": "doctrine/inflector", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "vimeo/psalm": "^4.10" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", - "homepage": "https://www.doctrine-project.org/projects/inflector.html", - "keywords": [ - "inflection", - "inflector", - "lowercase", - "manipulation", - "php", - "plural", - "singular", - "strings", - "uppercase", - "words" - ], - "support": { - "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.4" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", - "type": "tidelift" - } - ], - "time": "2021-10-22T20:16:43+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c", - "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.2" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-01-12T08:27:12+00:00" - }, - { - "name": "egulias/email-validator", - "version": "3.1.2", - "source": { - "type": "git", - "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ee0db30118f661fb166bcffbf5d82032df484697" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697", - "reference": "ee0db30118f661fb166bcffbf5d82032df484697", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^1.2", - "php": ">=7.2", - "symfony/polyfill-intl-idn": "^1.15" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^8.5.8|^9.3.3", - "vimeo/psalm": "^4" - }, - "suggest": { - "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Egulias\\EmailValidator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eduardo Gulias Davis" - } - ], - "description": "A library for validating emails against several RFCs", - "homepage": "https://github.com/egulias/EmailValidator", - "keywords": [ - "email", - "emailvalidation", - "emailvalidator", - "validation", - "validator" - ], - "support": { - "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.1.2" - }, - "funding": [ - { - "url": "https://github.com/egulias", - "type": "github" - } - ], - "time": "2021-10-11T09:18:27+00:00" - }, - { - "name": "illuminate/collections", - "version": "v9.0.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/collections.git", - "reference": "707ab36191228b1a4cf322985796ff7aab5578c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/707ab36191228b1a4cf322985796ff7aab5578c1", - "reference": "707ab36191228b1a4cf322985796ff7aab5578c1", - "shasum": "" - }, - "require": { - "illuminate/conditionable": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "php": "^8.0.2" - }, - "suggest": { - "symfony/var-dumper": "Required to use the dump method (^6.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "files": [ - "helpers.php" - ], - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Collections package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-09T21:49:11+00:00" - }, - { - "name": "illuminate/conditionable", - "version": "v9.0.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/conditionable.git", - "reference": "4f7e3d67ceda9a6188757501748982ea9ed5f69a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/conditionable/zipball/4f7e3d67ceda9a6188757501748982ea9ed5f69a", - "reference": "4f7e3d67ceda9a6188757501748982ea9ed5f69a", - "shasum": "" - }, - "require": { - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Conditionable package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-09T14:26:32+00:00" - }, - { - "name": "illuminate/container", - "version": "v9.0.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/container.git", - "reference": "b249d566e8f93b9255d84f4c06a8cc7db24c900c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/b249d566e8f93b9255d84f4c06a8cc7db24c900c", - "reference": "b249d566e8f93b9255d84f4c06a8cc7db24c900c", - "shasum": "" - }, - "require": { - "illuminate/contracts": "^9.0", - "php": "^8.0.2", - "psr/container": "^1.1.1|^2.0.1" - }, - "provide": { - "psr/container-implementation": "1.1|2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Container\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Container package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-05T18:02:43+00:00" - }, - { - "name": "illuminate/contracts", - "version": "v9.0.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "a6e356b03c62e96561072e569bdb3e15fe118d3f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/a6e356b03c62e96561072e569bdb3e15fe118d3f", - "reference": "a6e356b03c62e96561072e569bdb3e15fe118d3f", - "shasum": "" - }, - "require": { - "php": "^8.0.2", - "psr/container": "^1.1.1|^2.0.1", - "psr/simple-cache": "^1.0|^2.0|^3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Contracts\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Contracts package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-01T14:44:21+00:00" - }, - { - "name": "illuminate/filesystem", - "version": "v9.0.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/filesystem.git", - "reference": "2c74846fcd65df0fd5c2355b67bacfb94689fa32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/2c74846fcd65df0fd5c2355b67bacfb94689fa32", - "reference": "2c74846fcd65df0fd5c2355b67bacfb94689fa32", - "shasum": "" - }, - "require": { - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2", - "symfony/finder": "^6.0" - }, - "suggest": { - "ext-ftp": "Required to use the Flysystem FTP driver.", - "illuminate/http": "Required for handling uploaded files (^7.0).", - "league/flysystem": "Required to use the Flysystem local driver (^3.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", - "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", - "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", - "symfony/mime": "Required to enable support for guessing extensions (^6.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Filesystem package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-05T18:03:05+00:00" - }, - { - "name": "illuminate/macroable", - "version": "v9.0.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/macroable.git", - "reference": "25a2c6dac2b7541ecbadef952702e84ae15f5354" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/25a2c6dac2b7541ecbadef952702e84ae15f5354", - "reference": "25a2c6dac2b7541ecbadef952702e84ae15f5354", - "shasum": "" - }, - "require": { - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Macroable package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-01T14:44:21+00:00" - }, - { - "name": "illuminate/support", - "version": "v9.0.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "7fe407a1cf5e300546bbbd5284cc9a752a659366" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/7fe407a1cf5e300546bbbd5284cc9a752a659366", - "reference": "7fe407a1cf5e300546bbbd5284cc9a752a659366", - "shasum": "" - }, - "require": { - "doctrine/inflector": "^2.0", - "ext-json": "*", - "ext-mbstring": "*", - "illuminate/collections": "^9.0", - "illuminate/conditionable": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "nesbot/carbon": "^2.53.1", - "php": "^8.0.2", - "voku/portable-ascii": "^2.0" - }, - "conflict": { - "tightenco/collect": "<5.5.33" - }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (^9.0).", - "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^2.0.2).", - "ramsey/uuid": "Required to use Str::uuid() (^4.2.2).", - "symfony/process": "Required to use the composer class (^6.0).", - "symfony/var-dumper": "Required to use the dd function (^6.0).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "files": [ - "helpers.php" - ], - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Support package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-08T14:51:36+00:00" - }, - { - "name": "illuminate/translation", - "version": "v9.0.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/translation.git", - "reference": "8bdac1ceea6be67e8f1c93ad68ac4abe1f91df3f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/translation/zipball/8bdac1ceea6be67e8f1c93ad68ac4abe1f91df3f", - "reference": "8bdac1ceea6be67e8f1c93ad68ac4abe1f91df3f", - "shasum": "" - }, - "require": { - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/filesystem": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Translation package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-01T14:44:21+00:00" - }, - { - "name": "illuminate/validation", - "version": "v9.0.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/validation.git", - "reference": "81c77a578871775a7ec23fa639666bcca6a6e7e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/validation/zipball/81c77a578871775a7ec23fa639666bcca6a6e7e5", - "reference": "81c77a578871775a7ec23fa639666bcca6a6e7e5", - "shasum": "" - }, - "require": { - "egulias/email-validator": "^3.1", - "ext-json": "*", - "illuminate/collections": "^9.0", - "illuminate/container": "^9.0", - "illuminate/contracts": "^9.0", - "illuminate/macroable": "^9.0", - "illuminate/support": "^9.0", - "illuminate/translation": "^9.0", - "php": "^8.0.2", - "symfony/http-foundation": "^6.0", - "symfony/mime": "^6.0" - }, - "suggest": { - "ext-bcmath": "Required to use the multiple_of validation rule.", - "illuminate/database": "Required to use the database presence verifier (^9.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "9.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Validation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Validation package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2022-02-10T14:48:35+00:00" - }, - { - "name": "nesbot/carbon", - "version": "2.56.0", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "626ec8cbb724cd3c3400c3ed8f730545b744e3f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/626ec8cbb724cd3c3400c3ed8f730545b744e3f4", - "reference": "626ec8cbb724cd3c3400c3ed8f730545b744e3f4", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.1.8 || ^8.0", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" - }, - "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", - "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^3.0", - "kylekatarnls/multi-tester": "^2.0", - "phpmd/phpmd": "^2.9", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54 || ^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", - "squizlabs/php_codesniffer": "^3.4" - }, - "bin": [ - "bin/carbon" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.x-dev" - }, - "laravel": { - "providers": [ - "Carbon\\Laravel\\ServiceProvider" - ] - }, - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "https://markido.com" - }, - { - "name": "kylekatarnls", - "homepage": "https://github.com/kylekatarnls" - } - ], - "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "https://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "support": { - "docs": "https://carbon.nesbot.com/docs", - "issues": "https://github.com/briannesbitt/Carbon/issues", - "source": "https://github.com/briannesbitt/Carbon" - }, - "funding": [ - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], - "time": "2022-01-21T17:08:38+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/simple-cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "support": { - "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" - }, - "time": "2021-10-29T13:26:27+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", - "shasum": "" - }, - "require": { - "php": ">=8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-11-01T23:48:49+00:00" - }, - { - "name": "symfony/finder", - "version": "v6.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8661b74dbabc23223f38c9b99d3f8ade71170430", - "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430", - "shasum": "" - }, - "require": { - "php": ">=8.0.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v6.0.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-26T17:23:29+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v6.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "ad157299ced81a637fade1efcadd688d6deba5c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ad157299ced81a637fade1efcadd688d6deba5c1", - "reference": "ad157299ced81a637fade1efcadd688d6deba5c1", - "shasum": "" - }, - "require": { - "php": ">=8.0.2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/mime": "^5.4|^6.0" - }, - "suggest": { - "symfony/mime": "To use the file extension guesser" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Defines an object-oriented layer for the HTTP specification", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.0.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:55:41+00:00" - }, - { - "name": "symfony/mime", - "version": "v6.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "2cd9601efd040e56f43360daa68f3c6b0534923a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/2cd9601efd040e56f43360daa68f3c6b0534923a", - "reference": "2cd9601efd040e56f43360daa68f3c6b0534923a", - "shasum": "" - }, - "require": { - "php": ">=8.0.2", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" - }, - "conflict": { - "egulias/email-validator": "~3.0.0", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<5.4" - }, - "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/property-access": "^5.4|^6.0", - "symfony/property-info": "^5.4|^6.0", - "symfony/serializer": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Mime\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows manipulating MIME messages", - "homepage": "https://symfony.com", - "keywords": [ - "mime", - "mime-type" - ], - "support": { - "source": "https://github.com/symfony/mime/tree/v6.0.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:55:41+00:00" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-09-14T14:02:44+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-11-30T18:21:41+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:17:38+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-09-13T13:58:33+00:00" - }, - { - "name": "symfony/translation", - "version": "v6.0.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "71bb15335798f8c4da110911bcf2d2fead7a430d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/71bb15335798f8c4da110911bcf2d2fead7a430d", - "reference": "71bb15335798f8c4da110911bcf2d2fead7a430d", - "shasum": "" - }, - "require": { - "php": ">=8.0.2", - "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^2.3|^3.0" - }, - "conflict": { - "symfony/config": "<5.4", - "symfony/console": "<5.4", - "symfony/dependency-injection": "<5.4", - "symfony/http-kernel": "<5.4", - "symfony/twig-bundle": "<5.4", - "symfony/yaml": "<5.4" - }, - "provide": { - "symfony/translation-implementation": "2.3|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/finder": "^5.4|^6.0", - "symfony/http-client-contracts": "^1.1|^2.0|^3.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/intl": "^5.4|^6.0", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/service-contracts": "^1.1.2|^2|^3", - "symfony/yaml": "^5.4|^6.0" - }, - "suggest": { - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to internationalize your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/translation/tree/v6.0.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-07T00:29:03+00:00" - }, - { - "name": "symfony/translation-contracts", - "version": "v3.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", - "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", - "shasum": "" - }, - "require": { - "php": ">=8.0.2" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to translation", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.0.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-09-07T12:43:40+00:00" - }, - { - "name": "voku/portable-ascii", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/voku/portable-ascii.git", - "reference": "9bd89e83cecdf8c37b64909454249eaed98b2c89" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/9bd89e83cecdf8c37b64909454249eaed98b2c89", - "reference": "9bd89e83cecdf8c37b64909454249eaed98b2c89", - "shasum": "" - }, - "require": { - "php": ">=7.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" - }, - "suggest": { - "ext-intl": "Use Intl for transliterator_transliterate() support" - }, - "type": "library", - "autoload": { - "psr-4": { - "voku\\": "src/voku/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Lars Moelleken", - "homepage": "http://www.moelleken.org/" - } - ], - "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", - "homepage": "https://github.com/voku/portable-ascii", - "keywords": [ - "ascii", - "clean", - "php" - ], - "support": { - "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.paypal.me/moelleken", - "type": "custom" - }, - { - "url": "https://github.com/voku", - "type": "github" - }, - { - "url": "https://opencollective.com/portable-ascii", - "type": "open_collective" - }, - { - "url": "https://www.patreon.com/voku", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", - "type": "tidelift" - } - ], - "time": "2022-01-24T18:59:03+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.4.0" - }, - "platform-dev": [], - "plugin-api-version": "2.2.0" -} From 87af9472d5cc583bf0d108d4afecfce1973ca10f Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 14:36:58 +0530 Subject: [PATCH 02/16] Upgrade phpunit.xml to PHPUnit 11/12 schema --- .gitignore | 1 + phpunit.xml | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 41fbecc..e537f67 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /vendor composer.phar .DS_Store +/.phpunit.cache ### Composer template vendor/ diff --git a/phpunit.xml b/phpunit.xml index 3347b75..57d63f5 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,18 +1,19 @@ - + cacheDirectory=".phpunit.cache" + failOnWarning="true" + failOnRisky="true"> - ./tests/ + ./tests/ + + + ./src + + From 67e874a86489e7b7eb995b56be5323ef9aac18ba Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 14:39:36 +0530 Subject: [PATCH 03/16] Loosen phpunit failOn flags for cross-version deprecation tolerance --- phpunit.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 57d63f5..b658517 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -4,8 +4,8 @@ bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache" - failOnWarning="true" - failOnRisky="true"> + displayDetailsOnTestsThatTriggerWarnings="true" + displayDetailsOnPhpunitDeprecations="true"> ./tests/ From 165bc98a0ca1d679546089dd86ed1496530e0da7 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 14:40:33 +0530 Subject: [PATCH 04/16] Add Orchestra Testbench base test case --- composer.json | 5 +++++ tests/TestCase.php | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/TestCase.php diff --git a/composer.json b/composer.json index 01b6725..07a1fc9 100644 --- a/composer.json +++ b/composer.json @@ -40,5 +40,10 @@ "Prettus\\Validator\\": "src/Prettus/Validator/" } }, + "autoload-dev": { + "psr-4": { + "Prettus\\Validator\\Tests\\": "tests/" + } + }, "minimum-stability": "stable" } diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..4c92360 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,9 @@ + Date: Tue, 26 May 2026 14:48:33 +0530 Subject: [PATCH 05/16] Add test coverage for LaravelValidator public API --- tests/LaravelValidatorTest.php | 88 ++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 tests/LaravelValidatorTest.php diff --git a/tests/LaravelValidatorTest.php b/tests/LaravelValidatorTest.php new file mode 100644 index 0000000..37042b5 --- /dev/null +++ b/tests/LaravelValidatorTest.php @@ -0,0 +1,88 @@ +app->make(LaravelValidator::class); + } + + public function test_passes_returns_true_for_valid_data(): void + { + $v = $this->makeValidator() + ->setRules(['name' => 'required']) + ->with(['name' => 'Alice']); + + $this->assertTrue($v->passes()); + } + + public function test_passes_returns_false_and_populates_errors_when_invalid(): void + { + $v = $this->makeValidator() + ->setRules(['name' => 'required']) + ->with([]); + + $this->assertFalse($v->passes()); + $this->assertNotEmpty($v->errors()); + $this->assertNotEmpty($v->errorsBag()->all()); + } + + public function test_passes_or_fail_throws_validator_exception_on_invalid_data(): void + { + $v = $this->makeValidator() + ->setRules(['email' => 'required|email']) + ->with(['email' => 'not-an-email']); + + $this->expectException(ValidatorException::class); + $v->passesOrFail(); + } + + public function test_passes_or_fail_returns_true_on_valid_data(): void + { + $v = $this->makeValidator() + ->setRules(['email' => 'required|email']) + ->with(['email' => 'a@b.test']); + + $this->assertTrue($v->passesOrFail()); + } + + public function test_action_scoped_rules_are_selected_by_action_key(): void + { + $v = $this->makeValidator() + ->setRules([ + 'create' => ['name' => 'required'], + 'update' => ['name' => 'required|min:3'], + ]) + ->with(['name' => 'Al']); + + $this->assertTrue($v->passes('create')); + $this->assertFalse($v->passes('update')); + } + + public function test_set_id_rewrites_unique_rule_third_parameter(): void + { + $v = $this->makeValidator() + ->setId(42) + ->setRules(['email' => 'unique:users']); + + $rules = $v->getRules(); + $this->assertSame(['unique:users,email,42'], $rules['email']); + } + + public function test_custom_messages_and_attributes_are_applied(): void + { + $v = $this->makeValidator() + ->setRules(['name' => 'required']) + ->setMessages(['required' => ':attribute MUST be present']) + ->setAttributes(['name' => 'FullName']) + ->with([]); + + $this->assertFalse($v->passes()); + $this->assertStringContainsString('FullName MUST be present', $v->errors()[0]); + } +} From 0aea284893fdf13f6db41bfffd0d8c2ae5ff89e2 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 14:49:41 +0530 Subject: [PATCH 06/16] Replace Travis CI with GitHub Actions matrix --- .github/workflows/tests.yml | 37 +++++++++++++++++++++++++++++++++++++ .travis.yml | 13 ------------- 2 files changed, 37 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..352b7ec --- /dev/null +++ b/.github/workflows/tests.yml @@ -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: ['10.*', '11.*', '12.*', '13.*'] + exclude: + - php: '8.2' + laravel: '13.*' + + 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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f60bbe0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: php - -php: - - 5.4 - - 5.5 - - 5.6 - - hhvm - -before_script: - - travis_retry composer self-update - - travis_retry composer install --prefer-source --no-interaction --dev - -script: phpunit From e460cd94bcb7fccba31136829e30c06137da9854 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 14:50:10 +0530 Subject: [PATCH 07/16] Document Laravel 13 support in README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9488f79..c95cb4b 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ ## Installation +This package supports Laravel 10, 11, 12, and 13 on PHP 8.2+. + Add "prettus/laravel-repository": "1.1.*" to composer.json ```json From 9ad3888dd3fb06901dc5530ed2bd5b3f09ecd07b Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 14:59:22 +0530 Subject: [PATCH 08/16] Drop unused mockery/mockery dev dependency --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 07a1fc9..f9435d6 100644 --- a/composer.json +++ b/composer.json @@ -29,8 +29,7 @@ }, "require-dev": { "phpunit/phpunit": "^11.0|^12.0", - "orchestra/testbench": "^8.0|^9.0|^10.0|^11.0", - "mockery/mockery": "^1.6" + "orchestra/testbench": "^8.0|^9.0|^10.0|^11.0" }, "scripts": { "test": "phpunit" From 017e1abe8ac2796f348fa9f79f0d229ec2fed92b Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 16:11:02 +0530 Subject: [PATCH 09/16] Exclude PHP 8.4 + Laravel 10 from CI matrix (unsupported combo) --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 352b7ec..26d3386 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,6 +16,8 @@ jobs: exclude: - php: '8.2' laravel: '13.*' + - php: '8.4' + laravel: '10.*' name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }} From 3b43938df02b0e3037661cc45f488ea029701327 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 17:00:39 +0530 Subject: [PATCH 10/16] Modernize source for PHP 8.2 / Laravel 13 - Add declare(strict_types=1) to all source files - Add typed parameters, return types, and property types - Use constructor property promotion (LaravelValidator, ValidatorException) - Make ValidatorException::$messageBag readonly - Switch ValidatorException to Illuminate\Contracts\Support\MessageBag for wider type compatibility - Initialize $errors as empty MessageBag in AbstractValidator constructor (fixes latent fatal when errors() called before passes()) - Remove redundant PHPDoc blocks superseded by type declarations - Refactor parserValidationRules() with foreach instead of array_walk by-reference Breaking: ValidatorInterface signatures now typed. Consumers implementing the interface or extending AbstractValidator must update method signatures. --- src/Prettus/Validator/AbstractValidator.php | 211 +++++------------- .../Contracts/ValidatorInterface.php | 76 ++----- .../Exceptions/ValidatorException.php | 53 ++--- src/Prettus/Validator/LaravelValidator.php | 46 ++-- 4 files changed, 100 insertions(+), 286 deletions(-) diff --git a/src/Prettus/Validator/AbstractValidator.php b/src/Prettus/Validator/AbstractValidator.php index e219c3a..4a1c630 100644 --- a/src/Prettus/Validator/AbstractValidator.php +++ b/src/Prettus/Validator/AbstractValidator.php @@ -1,249 +1,142 @@ - - */ abstract class AbstractValidator implements ValidatorInterface { - /** - * @var int - */ - protected $id = null; + protected int|string|null $id = null; - /** - * Validator - * - * @var object - */ - protected $validator; + protected array $data = []; - /** - * Data to be validated - * - * @var array - */ - protected $data = array(); - - /** - * Validation Rules - * - * @var array - */ - protected $rules = array(); + protected array $rules = []; - /** - * Validation Custom Messages - * - * @var array - */ - protected $messages = array(); + protected array $messages = []; - /** - * Validation Custom Attributes - * - * @var array - */ - protected $attributes = array(); + protected array $attributes = []; - /** - * Validation errors - * - * @var MessageBag - */ - protected $errors = array(); + protected MessageBagContract $errors; + public function __construct() + { + $this->errors = new MessageBag(); + } - /** - * Set Id - * - * @param $id - * @return $this - */ - public function setId($id) + public function setId(int|string|null $id): static { $this->id = $id; + return $this; } - /** - * Set data to validate - * - * @param array $data - * @return $this - */ - public function with(array $data) + public function with(array $input): static { - $this->data = $data; + $this->data = $input; return $this; } /** - * Return errors - * - * @return array + * @return array */ - public function errors() + public function errors(): array { return $this->errorsBag()->all(); } - /** - * Errors - * - * @return MessageBag - */ - public function errorsBag() + public function errorsBag(): MessageBagContract { return $this->errors; } - /** - * Pass the data and the rules to the validator - * - * @param string $action - * @return boolean - */ - abstract public function passes($action = null); + abstract public function passes(?string $action = null): bool; /** - * Pass the data and the rules to the validator or throws ValidatorException - * * @throws ValidatorException - * @param string $action - * @return boolean */ - public function passesOrFail($action = null) + public function passesOrFail(?string $action = null): bool { - if (!$this->passes($action)) { + if (! $this->passes($action)) { throw new ValidatorException($this->errorsBag()); } return true; } - /** - * Get rule for validation by action ValidatorInterface::RULE_CREATE or ValidatorInterface::RULE_UPDATE - * - * Default rule: ValidatorInterface::RULE_CREATE - * - * @param null $action - * @return array - */ - public function getRules($action = null) + public function getRules(?string $action = null): array { $rules = $this->rules; - if (isset($this->rules[$action])) { + if ($action !== null && isset($this->rules[$action])) { $rules = $this->rules[$action]; } return $this->parserValidationRules($rules, $this->id); } - /** - * Set Rules for Validation - * - * @param array $rules - * @return $this - */ - public function setRules(array $rules) + public function setRules(array $rules): static { $this->rules = $rules; + return $this; } - /** - * Get Custom error messages for validation - * - * @return array - */ - public function getMessages() + public function getMessages(): array { return $this->messages; } - /** - * Set Custom error messages for Validation - * - * @param array $messages - * @return $this - */ - public function setMessages(array $messages) + public function setMessages(array $messages): static { $this->messages = $messages; + return $this; } - /** - * Get Custom error attributes for validation - * - * @return array - */ - public function getAttributes() + public function getAttributes(): array { return $this->attributes; } - /** - * Set Custom error attributes for Validation - * - * @param array $attributes - * @return $this - */ - public function setAttributes(array $attributes) + public function setAttributes(array $attributes): static { $this->attributes = $attributes; + return $this; } - /** - * Parser Validation Rules - * - * @param $rules - * @param null $id - * @return array - */ - protected function parserValidationRules($rules, $id = null) + protected function parserValidationRules(array $rules, int|string|null $id = null): array { - if (null === $id) { + if ($id === null) { return $rules; } - array_walk($rules, function (&$rules, $field) use ($id) { - if (!is_array($rules)) { - $rules = explode("|", $rules); - } - - foreach ($rules as $ruleIdx => $rule) { - // get name and parameters - @list($name, $params) = array_pad(explode(":", $rule), 2, null); - - // only do someting for the unique rule - if (strtolower($name) != "unique") { - continue; // continue in foreach loop, nothing left to do here - } + foreach ($rules as $field => $fieldRules) { + $fieldRules = is_array($fieldRules) ? $fieldRules : explode('|', $fieldRules); - $p = array_map("trim", explode(",", $params)); + foreach ($fieldRules as $idx => $rule) { + [$name, $params] = array_pad(explode(':', $rule, 2), 2, null); - // set field name to rules key ($field) (laravel convention) - if (!isset($p[1])) { - $p[1] = $field; + if (strtolower($name) !== 'unique') { + continue; } - // set 3rd parameter to id given to getValidationRules() - $p[2] = $id; + $parts = $params === null ? [] : array_map('trim', explode(',', $params)); + $parts[0] = $parts[0] ?? ''; + $parts[1] = $parts[1] ?? $field; + $parts[2] = (string) $id; - $params = implode(",", $p); - $rules[$ruleIdx] = $name.":".$params; + $fieldRules[$idx] = $name.':'.implode(',', $parts); } - }); + + $rules[$field] = $fieldRules; + } return $rules; } diff --git a/src/Prettus/Validator/Contracts/ValidatorInterface.php b/src/Prettus/Validator/Contracts/ValidatorInterface.php index 03072ae..fbf40e1 100644 --- a/src/Prettus/Validator/Contracts/ValidatorInterface.php +++ b/src/Prettus/Validator/Contracts/ValidatorInterface.php @@ -1,80 +1,36 @@ - - */ interface ValidatorInterface { - const RULE_CREATE = 'create'; - const RULE_UPDATE = 'update'; + public const RULE_CREATE = 'create'; + public const RULE_UPDATE = 'update'; - /** - * Set Id - * - * @param $id - * @return $this - */ - public function setId($id); + public function setId(int|string|null $id): static; - /** - * With - * - * @param array - * @return $this - */ - public function with(array $input); + public function with(array $input): static; - /** - * Pass the data and the rules to the validator - * - * @param string $action - * @return boolean - */ - public function passes($action = null); + public function passes(?string $action = null): bool; /** - * Pass the data and the rules to the validator or throws ValidatorException - * * @throws ValidatorException - * @param string $action - * @return boolean */ - public function passesOrFail($action = null); + public function passesOrFail(?string $action = null): bool; /** - * Errors - * - * @return array + * @return array */ - public function errors(); + public function errors(): array; - /** - * Errors - * - * @return MessageBag - */ - public function errorsBag(); + public function errorsBag(): MessageBag; - /** - * Set Rules for Validation - * - * @param array $rules - * @return $this - */ - public function setRules(array $rules); + public function setRules(array $rules): static; - /** - * Get rule for validation by action ValidatorInterface::RULE_CREATE or ValidatorInterface::RULE_UPDATE - * - * Default rule: ValidatorInterface::RULE_CREATE - * - * @param $action - * @return array - */ - public function getRules($action = null); + public function getRules(?string $action = null): array; } diff --git a/src/Prettus/Validator/Exceptions/ValidatorException.php b/src/Prettus/Validator/Exceptions/ValidatorException.php index d0cb660..15d575c 100644 --- a/src/Prettus/Validator/Exceptions/ValidatorException.php +++ b/src/Prettus/Validator/Exceptions/ValidatorException.php @@ -1,58 +1,39 @@ - - */ -class ValidatorException extends \Exception implements Jsonable, Arrayable +class ValidatorException extends Exception implements Arrayable, Jsonable { - /** - * @var MessageBag - */ - protected $messageBag; - - /** - * @param MessageBag $messageBag - */ - public function __construct(MessageBag $messageBag) + public function __construct(protected readonly MessageBag $messageBag) { - $this->messageBag = $messageBag; + parent::__construct('Validation failed.'); } - /** - * @return MessageBag - */ - public function getMessageBag() + public function getMessageBag(): MessageBag { return $this->messageBag; } /** - * Get the instance as an array. - * - * @return array + * @return array{error: string, error_description: MessageBag} */ - public function toArray() + public function toArray(): array { return [ - 'error'=>'validation_exception', - 'error_description'=>$this->getMessageBag() + 'error' => 'validation_exception', + 'error_description' => $this->getMessageBag(), ]; } - /** - * Convert the object to its JSON representation. - * - * @param int $options - * @return string - */ - public function toJson($options = 0) + public function toJson($options = 0): string { - return json_encode($this->toArray(), $options); + return json_encode($this->toArray(), $options) ?: ''; } } diff --git a/src/Prettus/Validator/LaravelValidator.php b/src/Prettus/Validator/LaravelValidator.php index 42bc053..1135fca 100644 --- a/src/Prettus/Validator/LaravelValidator.php +++ b/src/Prettus/Validator/LaravelValidator.php @@ -1,46 +1,30 @@ - - */ class LaravelValidator extends AbstractValidator { - /** - * Validator - * - * @var \Illuminate\Validation\Factory - */ - protected $validator; - - /** - * Construct - * - * @param \Illuminate\Contracts\Validation\Factory $validator - */ - public function __construct(Factory $validator) + public function __construct(protected Factory $validator) { - $this->validator = $validator; + parent::__construct(); } - /** - * Pass the data and the rules to the validator - * - * @param string $action - * @return bool - */ - public function passes($action = null) + public function passes(?string $action = null): bool { - $rules = $this->getRules($action); - $messages = $this->getMessages(); - $attributes = $this->getAttributes(); - $validator = $this->validator->make($this->data, $rules, $messages, $attributes); + $validator = $this->validator->make( + $this->data, + $this->getRules($action), + $this->getMessages(), + $this->getAttributes(), + ); if ($validator->fails()) { $this->errors = $validator->messages(); + return false; } From 4449b0c917c8734cb923877b992f1ebd80687c59 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 17:00:40 +0530 Subject: [PATCH 11/16] Expand test coverage for fresh instance and exception payload - Assert errors() returns [] on fresh instance (regression for latent bug) - Assert errors() returns [] after successful validation - Cover ValidatorException::getMessageBag(), toArray(), toJson() --- tests/LaravelValidatorTest.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/LaravelValidatorTest.php b/tests/LaravelValidatorTest.php index 37042b5..31e930d 100644 --- a/tests/LaravelValidatorTest.php +++ b/tests/LaravelValidatorTest.php @@ -19,6 +19,31 @@ public function test_passes_returns_true_for_valid_data(): void ->with(['name' => 'Alice']); $this->assertTrue($v->passes()); + $this->assertSame([], $v->errors()); + } + + public function test_errors_returns_empty_array_on_fresh_instance(): void + { + $v = $this->makeValidator(); + + $this->assertSame([], $v->errors()); + $this->assertSame([], $v->errorsBag()->all()); + } + + public function test_validator_exception_carries_messagebag_payload(): void + { + $v = $this->makeValidator() + ->setRules(['name' => 'required']) + ->with([]); + + try { + $v->passesOrFail(); + $this->fail('Expected ValidatorException'); + } catch (ValidatorException $e) { + $this->assertNotEmpty($e->getMessageBag()->all()); + $this->assertSame('validation_exception', $e->toArray()['error']); + $this->assertJson($e->toJson()); + } } public function test_passes_returns_false_and_populates_errors_when_invalid(): void From feb32ca4f9f05dbc5fc4e7f61327faa334087393 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 17:07:22 +0530 Subject: [PATCH 12/16] Drop Laravel 10 support (EOL Feb 2026, incompatible with PHPUnit 11+) --- .github/workflows/tests.yml | 4 +--- composer.json | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 26d3386..37a6ac5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,12 +12,10 @@ jobs: fail-fast: false matrix: php: ['8.2', '8.3', '8.4'] - laravel: ['10.*', '11.*', '12.*', '13.*'] + laravel: ['11.*', '12.*', '13.*'] exclude: - php: '8.2' laravel: '13.*' - - php: '8.4' - laravel: '10.*' name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }} diff --git a/composer.json b/composer.json index f9435d6..06709ed 100644 --- a/composer.json +++ b/composer.json @@ -24,12 +24,12 @@ }, "require": { "php": "^8.2", - "illuminate/support": "^10.0|^11.0|^12.0|^13.0", - "illuminate/validation": "^10.0|^11.0|^12.0|^13.0" + "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": "^8.0|^9.0|^10.0|^11.0" + "orchestra/testbench": "^9.0|^10.0|^11.0" }, "scripts": { "test": "phpunit" From 3676aa7c41af795dd8b8db4320f2f50ec9364da3 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 17:07:22 +0530 Subject: [PATCH 13/16] Preserve empty exception message for backward compatibility ValidatorException previously did not call parent::__construct(), so $e->getMessage() returned an empty string. Restore that behavior to avoid silently changing what API consumers display via getMessage(). --- src/Prettus/Validator/Exceptions/ValidatorException.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Prettus/Validator/Exceptions/ValidatorException.php b/src/Prettus/Validator/Exceptions/ValidatorException.php index 15d575c..1bb5876 100644 --- a/src/Prettus/Validator/Exceptions/ValidatorException.php +++ b/src/Prettus/Validator/Exceptions/ValidatorException.php @@ -13,7 +13,6 @@ class ValidatorException extends Exception implements Arrayable, Jsonable { public function __construct(protected readonly MessageBag $messageBag) { - parent::__construct('Validation failed.'); } public function getMessageBag(): MessageBag From 2e2db84c9fa619c6d19a6ae07f990e845994143a Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 17:07:22 +0530 Subject: [PATCH 14/16] Add regression tests for unique-rule rewriter edge cases Covers pipe-separated rule strings and non-unique rules left untouched by setId() / parserValidationRules(). --- tests/LaravelValidatorTest.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/LaravelValidatorTest.php b/tests/LaravelValidatorTest.php index 31e930d..c0e18c0 100644 --- a/tests/LaravelValidatorTest.php +++ b/tests/LaravelValidatorTest.php @@ -99,6 +99,26 @@ public function test_set_id_rewrites_unique_rule_third_parameter(): void $this->assertSame(['unique:users,email,42'], $rules['email']); } + public function test_set_id_rewrites_unique_rule_inside_pipe_string(): void + { + $v = $this->makeValidator() + ->setId(7) + ->setRules(['email' => 'required|unique:users']); + + $rules = $v->getRules(); + $this->assertSame(['required', 'unique:users,email,7'], $rules['email']); + } + + public function test_set_id_leaves_non_unique_rules_untouched(): void + { + $v = $this->makeValidator() + ->setId(99) + ->setRules(['name' => 'required|max:255']); + + $rules = $v->getRules(); + $this->assertSame(['required', 'max:255'], $rules['name']); + } + public function test_custom_messages_and_attributes_are_applied(): void { $v = $this->makeValidator() From 75d10b8bccf0d7cf9af335efe078d91dfad44974 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Tue, 26 May 2026 17:07:22 +0530 Subject: [PATCH 15/16] Document breaking changes in README --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c95cb4b..24b0466 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,14 @@ ## Installation -This package supports Laravel 10, 11, 12, and 13 on PHP 8.2+. +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-repository": "1.1.*" to composer.json From b73a1fb0fbaff8230392a1eb06c5d6a26f58dd74 Mon Sep 17 00:00:00 2001 From: Navneet Kumar Date: Wed, 27 May 2026 21:12:33 +0530 Subject: [PATCH 16/16] Address Copilot review feedback - Throw on json_encode failure in ValidatorException::toJson instead of silently returning an empty string, so invalid JSON surfaces as an error rather than a malformed payload. - Fix stale README install snippet that referenced the wrong package name and outdated version constraint. --- README.md | 12 +++++++++--- .../Validator/Exceptions/ValidatorException.php | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 24b0466..a761685 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,16 @@ This package supports Laravel 11, 12, and 13 on PHP 8.2+ (PHP 8.3+ required for - 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-repository": "1.1.*" to composer.json - +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 diff --git a/src/Prettus/Validator/Exceptions/ValidatorException.php b/src/Prettus/Validator/Exceptions/ValidatorException.php index 1bb5876..6ced361 100644 --- a/src/Prettus/Validator/Exceptions/ValidatorException.php +++ b/src/Prettus/Validator/Exceptions/ValidatorException.php @@ -33,6 +33,6 @@ public function toArray(): array public function toJson($options = 0): string { - return json_encode($this->toArray(), $options) ?: ''; + return json_encode($this->toArray(), $options | JSON_THROW_ON_ERROR); } }