Skip to content

Commit 84513ba

Browse files
authored
PHP 8.4 deprecations & minimum versions bump (#733)
1 parent 62b458e commit 84513ba

File tree

6 files changed

+15
-21
lines changed

6 files changed

+15
-21
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@ jobs:
1515
max-parallel: 6 # 12
1616
fail-fast: false
1717
matrix:
18-
laravel: [9, 10, 11]
19-
php: ['8.1', '8.2', '8.3']
20-
phpunit: [9, 10]
18+
laravel: [10, 11]
19+
php: ['8.2', '8.3', '8.4']
20+
phpunit: [10]
2121
exclude:
22-
- {laravel: 11, php: '8.1'}
23-
- {laravel: 9, phpunit: 10}
24-
- {phpunit: 9}
25-
include:
26-
- {laravel: 9, php: '8.1', phpunit: 9}
27-
- {laravel: 9, php: '8.2', phpunit: 9}
28-
- {laravel: 9, php: '8.3', phpunit: 9}
22+
- {laravel: 10, php: '8.4'}
2923
steps:
3024
- name: Checkout repository
3125
uses: actions/checkout@v3

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"require": {
1313
"php": "^8.0",
1414
"rdx/laravelcollective-html": "^6",
15-
"illuminate/database": "^6 || ^7 || ^8 || ^9 || ^10 || ^11",
16-
"illuminate/validation": "^6 || ^7 || ^8 || ^9 || ^10 || ^11"
15+
"illuminate/database": "^10 || ^11",
16+
"illuminate/validation": "^10 || ^11"
1717
},
1818
"require-dev": {
19-
"orchestra/testbench": "^6.13 || ^7 || ^8 || ^9",
19+
"orchestra/testbench": "^8 || ^9",
2020
"phpunit/phpunit": "^10.0"
2121
},
2222
"extra": {

phpunit.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
processIsolation="false"
99
stopOnFailure="false"
1010
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
11+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
1212
>
1313
<testsuites>
1414
<testsuite name="Package Test Suite">
@@ -19,7 +19,7 @@
1919
<exclude>./tests/FormBuilderTestCase.php</exclude>
2020
</testsuite>
2121
</testsuites>
22-
<coverage>
22+
<source>
2323
<include>
2424
<directory>./src/Kris</directory>
2525
</include>
@@ -29,5 +29,5 @@
2929
<file>./src/Kris/LaravelFormBuilder/Console/FormMakeCommand.php</file>
3030
<file>./src/Kris/LaravelFormBuilder/FormBuilderTrait.php</file>
3131
</exclude>
32-
</coverage>
32+
</source>
3333
</phpunit>

src/Kris/LaravelFormBuilder/Filters/Exception/InvalidInstanceException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
*/
1414
class InvalidInstanceException extends \Exception
1515
{
16-
public function __construct($message = "", $code = 0, Throwable $previous = null)
16+
public function __construct($message = "", $code = 0, ?Throwable $previous = null)
1717
{
1818
$message = 'Filter object must implement ' . FilterInterface::class;
1919
parent::__construct($message, $code, $previous);
2020
}
21-
}
21+
}

src/Kris/LaravelFormBuilder/Filters/Exception/UnableToResolveFilterException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
*/
1313
class UnableToResolveFilterException extends \Exception
1414
{
15-
public function __construct($message = "", $code = 0, Throwable $previous = null)
15+
public function __construct($message = "", $code = 0, ?Throwable $previous = null)
1616
{
1717
$message = "Passed filter can't be resolved.";
1818
parent::__construct($message, $code, $previous);
1919
}
20-
}
20+
}

src/Kris/LaravelFormBuilder/RulesParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ protected function parseParameters($rule, $parameter)
606606
if (strtolower($rule) == 'regex') {
607607
return [$parameter];
608608
}
609-
return str_getcsv($parameter);
609+
return str_getcsv($parameter, escape: '\\');
610610
}
611611

612612
/**

0 commit comments

Comments
 (0)