Skip to content

Commit b7acce3

Browse files
Merge pull request #2 from enlightn/laravel9
Add support for Laravel 9
2 parents 6356b2e + f5f4a02 commit b7acce3

File tree

8 files changed

+2773
-3393
lines changed

8 files changed

+2773
-3393
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/phpunit.xml.dist export-ignore
1515
/tests export-ignore
1616
/.editorconfig export-ignore
17-
/.php_cs.dist export-ignore
17+
/.php-cs-fixer.dist.php export-ignore
1818
/.github export-ignore
1919
/psalm.xml export-ignore
2020
/psalm.xml.dist export-ignore

.github/workflows/format_php.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Run php-cs-fixer
1414
uses: docker://oskarstark/php-cs-fixer-ga
1515
with:
16-
args: --config=.php_cs.dist
16+
args: --config=.php-cs-fixer.dist.php
1717

1818
- uses: stefanzweifel/[email protected]
1919
with:

.github/workflows/manual.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,17 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php: [7.3, 7.4, 8.0]
17-
laravel: [6.*, 7.*, 8.*]
16+
php: [7.3, 7.4, 8.0, 8.1]
17+
laravel: [6.*, 7.*, 8.*, 9.*]
18+
exclude:
19+
- php: 8.1
20+
laravel: 6.*
21+
- php: 8.1
22+
laravel: 7.*
23+
- php: 7.3
24+
laravel: 9.*
25+
- php: 7.4
26+
laravel: 9.*
1827

1928
name: P${{ matrix.php }} - L${{ matrix.laravel }}
2029

.github/workflows/tests.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
php: [7.3, 7.4, 8.0]
12-
laravel: [6.*, 7.*, 8.*]
11+
php: [7.3, 7.4, 8.0, 8.1]
12+
laravel: [6.*, 7.*, 8.*, 9.*]
13+
exclude:
14+
- php: 8.1
15+
laravel: 6.*
16+
- php: 8.1
17+
laravel: 7.*
18+
- php: 7.3
19+
laravel: 9.*
20+
- php: 7.4
21+
laravel: 9.*
1322

1423
name: P${{ matrix.php }} - L${{ matrix.laravel }}
1524

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.idea
33
.php_cs
44
.php_cs.cache
5+
.php-cs-fixer.cache
56
.phpunit.result.cache
67
build
78
/composer.lock

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
->exclude('Fixtures')
55
->in([__DIR__.'/src', __DIR__.'/tests']);
66

7-
return PhpCsFixer\Config::create()
7+
return (new PhpCsFixer\Config())
88
->setFinder($finder)
99
->setRules([
1010
'@PSR2' => true,
1111
'array_syntax' => ['syntax' => 'short'],
12-
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
12+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
1313
'no_unused_imports' => true,
1414
'not_operator_with_successor_space' => true,
15-
'trailing_comma_in_multiline_array' => true,
15+
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
1616
'phpdoc_scalar' => true,
1717
'unary_operator_spaces' => true,
1818
'binary_operator_spaces' => true,
@@ -23,7 +23,7 @@
2323
'phpdoc_var_without_name' => true,
2424
'class_attributes_separation' => [
2525
'elements' => [
26-
'method',
26+
'method' => 'one',
2727
],
2828
],
2929
'method_argument_space' => [

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
"require": {
2020
"php": "^7.2|^8.0",
2121
"enlightn/security-checker": "^1.8",
22-
"laravel/framework": "^6.0|^7.0|^8.0"
22+
"laravel/framework": "^6.0|^7.0|^8.0|^9.0"
2323
},
2424
"require-dev": {
2525
"barryvdh/laravel-ide-helper": "^2.8",
26-
"friendsofphp/php-cs-fixer": "^2.18",
26+
"friendsofphp/php-cs-fixer": "^2.18|^3.0",
2727
"mockery/mockery": "^1.3",
28-
"orchestra/testbench": "^4.0|^5.0|^6.0",
28+
"orchestra/testbench": "^4.0|^5.20|^6.15|^7.0",
2929
"phpunit/phpunit": "^7.5|^8.0|^9.0"
3030
},
3131
"autoload": {
@@ -38,6 +38,9 @@
3838
"Enlightn\\LaravelSecurityChecker\\Tests\\": "tests"
3939
}
4040
},
41+
"scripts": {
42+
"test": "vendor/bin/phpunit --verbose"
43+
},
4144
"config": {
4245
"sort-packages": true
4346
},

0 commit comments

Comments
 (0)