diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9af7919d..ea8acd92 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,17 +15,11 @@ jobs: max-parallel: 6 # 12 fail-fast: false matrix: - laravel: [9, 10, 11] - php: ['8.1', '8.2', '8.3'] - phpunit: [9, 10] + laravel: [10, 11] + php: ['8.2', '8.3', '8.4'] + phpunit: [10] exclude: - - {laravel: 11, php: '8.1'} - - {laravel: 9, phpunit: 10} - - {phpunit: 9} - include: - - {laravel: 9, php: '8.1', phpunit: 9} - - {laravel: 9, php: '8.2', phpunit: 9} - - {laravel: 9, php: '8.3', phpunit: 9} + - {laravel: 10, php: '8.4'} steps: - name: Checkout repository uses: actions/checkout@v3 diff --git a/composer.json b/composer.json index 7105eaf2..3eb7a0ef 100644 --- a/composer.json +++ b/composer.json @@ -12,11 +12,11 @@ "require": { "php": "^8.0", "rdx/laravelcollective-html": "^6", - "illuminate/database": "^6 || ^7 || ^8 || ^9 || ^10 || ^11", - "illuminate/validation": "^6 || ^7 || ^8 || ^9 || ^10 || ^11" + "illuminate/database": "^10 || ^11", + "illuminate/validation": "^10 || ^11" }, "require-dev": { - "orchestra/testbench": "^6.13 || ^7 || ^8 || ^9", + "orchestra/testbench": "^8 || ^9", "phpunit/phpunit": "^10.0" }, "extra": { diff --git a/phpunit.xml b/phpunit.xml index 0545ef35..6ac4b5e8 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -8,7 +8,7 @@ processIsolation="false" stopOnFailure="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" > @@ -19,7 +19,7 @@ ./tests/FormBuilderTestCase.php - + ./src/Kris @@ -29,5 +29,5 @@ ./src/Kris/LaravelFormBuilder/Console/FormMakeCommand.php ./src/Kris/LaravelFormBuilder/FormBuilderTrait.php - + diff --git a/src/Kris/LaravelFormBuilder/Filters/Exception/InvalidInstanceException.php b/src/Kris/LaravelFormBuilder/Filters/Exception/InvalidInstanceException.php index 34fc5359..4317609a 100644 --- a/src/Kris/LaravelFormBuilder/Filters/Exception/InvalidInstanceException.php +++ b/src/Kris/LaravelFormBuilder/Filters/Exception/InvalidInstanceException.php @@ -13,9 +13,9 @@ */ class InvalidInstanceException extends \Exception { - public function __construct($message = "", $code = 0, Throwable $previous = null) + public function __construct($message = "", $code = 0, ?Throwable $previous = null) { $message = 'Filter object must implement ' . FilterInterface::class; parent::__construct($message, $code, $previous); } -} \ No newline at end of file +} diff --git a/src/Kris/LaravelFormBuilder/Filters/Exception/UnableToResolveFilterException.php b/src/Kris/LaravelFormBuilder/Filters/Exception/UnableToResolveFilterException.php index b8f4b5c7..91f8ba48 100644 --- a/src/Kris/LaravelFormBuilder/Filters/Exception/UnableToResolveFilterException.php +++ b/src/Kris/LaravelFormBuilder/Filters/Exception/UnableToResolveFilterException.php @@ -12,9 +12,9 @@ */ class UnableToResolveFilterException extends \Exception { - public function __construct($message = "", $code = 0, Throwable $previous = null) + public function __construct($message = "", $code = 0, ?Throwable $previous = null) { $message = "Passed filter can't be resolved."; parent::__construct($message, $code, $previous); } -} \ No newline at end of file +} diff --git a/src/Kris/LaravelFormBuilder/RulesParser.php b/src/Kris/LaravelFormBuilder/RulesParser.php index 6f7452e6..51ddf8a9 100644 --- a/src/Kris/LaravelFormBuilder/RulesParser.php +++ b/src/Kris/LaravelFormBuilder/RulesParser.php @@ -606,7 +606,7 @@ protected function parseParameters($rule, $parameter) if (strtolower($rule) == 'regex') { return [$parameter]; } - return str_getcsv($parameter); + return str_getcsv($parameter, escape: '\\'); } /**