File tree 7 files changed +53
-119
lines changed 7 files changed +53
-119
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 9
9
jobs :
10
10
test :
11
11
name : Test
12
- runs-on : ubuntu-20.04
12
+ runs-on : ubuntu-latest
13
13
container :
14
- image : php:8.0-cli
14
+ image : laravelfans/laravel:8-dev
15
15
steps :
16
- - name : Checkout
17
- uses : actions/checkout@v2
18
- - name : Prepare
19
- run : |
20
- apt update
21
- apt install -y libzip-dev unzip
22
- pecl install xdebug
23
- docker-php-ext-enable xdebug
24
- cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
25
- echo 'xdebug.mode=coverage' >> /usr/local/etc/php/php.ini
26
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
27
- - name : PHPUnit
16
+ -
17
+ name : Checkout
18
+ uses : actions/checkout@v4
19
+ -
20
+ name : PHPUnit
21
+ env :
22
+ XDEBUG_MODE : coverage
28
23
run : |
29
24
composer require orchestra/testbench:^v6 --dev
30
25
./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/
31
- - name : Lint
26
+ -
27
+ name : Lint
32
28
run : |
33
29
./vendor/bin/phpcs --standard=PSR12 src/ tests/
34
30
./vendor/bin/phpmd . text src/stubs/phpmd.xml
35
- - name : codecov
36
- uses : codecov/codecov-action@v2
31
+ -
32
+ name : Upload coverage to Codecov
33
+ uses : codecov/codecov-action@v4
37
34
with :
38
35
name : laravel-8
36
+ token : ${{ secrets.CODECOV_TOKEN }}
37
+ -
38
+ name : install in real Laravel project
39
+ run : |
40
+ rm -rf laravel-demo
41
+ composer create-project --prefer-dist laravel/laravel laravel-demo "8.*"
42
+ cd laravel-demo && composer require --dev laravel-fans/lint:dev-${CI_ACTION_REF_NAME} && php artisan lint:publish
43
+ php artisan lint:code --help
44
+ php artisan lint:code /database/seeds/
Original file line number Diff line number Diff line change @@ -11,28 +11,34 @@ jobs:
11
11
name : Test
12
12
runs-on : ubuntu-latest
13
13
container :
14
- image : php:8.1-cli
14
+ image : laravelfans/laravel:9-dev
15
15
steps :
16
- - name : Checkout
17
- uses : actions/checkout@v2
18
- - name : Prepare
19
- run : |
20
- apt update
21
- apt install -y libzip-dev unzip
22
- pecl install xdebug
23
- docker-php-ext-enable xdebug
24
- cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
25
- echo 'xdebug.mode=coverage' >> /usr/local/etc/php/php.ini
26
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
27
- - name : PHPUnit
16
+ -
17
+ name : Checkout
18
+ uses : actions/checkout@v4
19
+ -
20
+ name : PHPUnit
21
+ env :
22
+ XDEBUG_MODE : coverage
28
23
run : |
29
24
composer require orchestra/testbench:^v7 --dev
30
25
./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/
31
- - name : Lint
26
+ -
27
+ name : Lint
32
28
run : |
33
29
./vendor/bin/phpcs --standard=PSR12 src/ tests/
34
30
./vendor/bin/phpmd . text src/stubs/phpmd.xml
35
- - name : codecov
36
- uses : codecov/codecov-action@v2
31
+ -
32
+ name : Upload coverage to Codecov
33
+ uses : codecov/codecov-action@v4
37
34
with :
38
35
name : laravel-9
36
+ token : ${{ secrets.CODECOV_TOKEN }}
37
+ -
38
+ name : install in real Laravel project
39
+ run : |
40
+ rm -rf laravel-demo
41
+ composer create-project --prefer-dist laravel/laravel laravel-demo "9.*"
42
+ cd laravel-demo && composer require --dev laravel-fans/lint:dev-${CI_ACTION_REF_NAME} && php artisan lint:publish
43
+ php artisan lint:code --help
44
+ php artisan lint:code /database/seeds/
Original file line number Diff line number Diff line change 1
1
# Laravel Lint
2
2
3
- [ ![ codecov] ( https://codecov.io/gh/laravel-fans/laravel-lint/branch/main/graph/badge.svg )] ( https://codecov.io/gh/laravel-fans/laravel-lint )
4
- [ ![ Laravel 6] ( https://github.com/laravel-fans/laravel-lint/workflows/Laravel%206/badge.svg )] ( https://github.com/laravel-fans/laravel-lint/actions )
5
- [ ![ Laravel 7] ( https://github.com/laravel-fans/laravel-lint/workflows/Laravel%207/badge.svg )] ( https://github.com/laravel-fans/laravel-lint/actions )
6
- [ ![ Laravel 8] ( https://github.com/laravel-fans/laravel-lint/workflows/Laravel%208/badge.svg )] ( https://github.com/laravel-fans/laravel-lint/actions )
7
- [ ![ Laravel 9] ( https://github.com/laravel-fans/laravel-lint/workflows/Laravel%209/badge.svg )] ( https://github.com/laravel-fans/laravel-lint/actions )
3
+ [ ![ codecov] ( https://codecov.io/gh/laravel-fans/laravel-lint/graph/badge.svg?token=QJjYkPVnr4 )] ( https://codecov.io/gh/laravel-fans/laravel-lint )
4
+ ![ Packagist Downloads] ( https://img.shields.io/packagist/dm/laravel-fans/lint )
5
+ [ ![ Laravel 8] ( https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-8.yml/badge.svg )] ( https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-8.yml )
6
+ [ ![ Laravel 9] ( https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-9.yml/badge.svg )] ( https://github.com/laravel-fans/laravel-lint/actions/workflows/laravel-9.yml )
8
7
9
8
Check Code Style(default PSR-12) for Laravel
10
9
Original file line number Diff line number Diff line change 30
30
"minimum-stability" : " stable" ,
31
31
"require" : {
32
32
"ext-json" : " *" ,
33
- "illuminate/support" : " >=v6.20.36 " ,
34
- "phpmd/phpmd" : " ^ 2.10" ,
35
- "squizlabs/php_codesniffer" : " ^ 3.5"
33
+ "illuminate/support" : " >=v8 " ,
34
+ "phpmd/phpmd" : " >= 2.10" ,
35
+ "squizlabs/php_codesniffer" : " >= 3.5"
36
36
},
37
37
"require-dev" : {
38
- "orchestra/testbench" : " >=v4.8.0 "
38
+ "orchestra/testbench" : " >=v6 "
39
39
}
40
40
}
Original file line number Diff line number Diff line change 14
14
<!-- ignore ERROR: Each class must be in a namespace of at least one level (a top-level vendor name) -->
15
15
<rule ref =" PSR1.Classes.ClassDeclaration.MissingNamespace" >
16
16
<exclude-pattern >/database/migrations/</exclude-pattern >
17
- <exclude-pattern >/database/seeds/</exclude-pattern >
18
17
</rule >
19
18
20
19
<!-- ignore WARNING: No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them. -->
You can’t perform that action at this time.
0 commit comments