Skip to content

Commit db84236

Browse files
committed
feat: #28 laravel 8 seeds have namespace
1 parent 5bbaf2d commit db84236

File tree

7 files changed

+53
-119
lines changed

7 files changed

+53
-119
lines changed

.github/workflows/laravel-6.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/laravel-7.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/laravel-8.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,36 @@ on:
99
jobs:
1010
test:
1111
name: Test
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-latest
1313
container:
14-
image: php:8.0-cli
14+
image: laravelfans/laravel:8-dev
1515
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
2823
run: |
2924
composer require orchestra/testbench:^v6 --dev
3025
./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/
31-
- name: Lint
26+
-
27+
name: Lint
3228
run: |
3329
./vendor/bin/phpcs --standard=PSR12 src/ tests/
3430
./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
3734
with:
3835
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/

.github/workflows/laravel-9.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,34 @@ jobs:
1111
name: Test
1212
runs-on: ubuntu-latest
1313
container:
14-
image: php:8.1-cli
14+
image: laravelfans/laravel:9-dev
1515
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
2823
run: |
2924
composer require orchestra/testbench:^v7 --dev
3025
./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/
31-
- name: Lint
26+
-
27+
name: Lint
3228
run: |
3329
./vendor/bin/phpcs --standard=PSR12 src/ tests/
3430
./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
3734
with:
3835
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/

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Laravel Lint
22

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)
87

98
Check Code Style(default PSR-12) for Laravel
109

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
"minimum-stability": "stable",
3131
"require": {
3232
"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"
3636
},
3737
"require-dev": {
38-
"orchestra/testbench": ">=v4.8.0"
38+
"orchestra/testbench": ">=v6"
3939
}
4040
}

src/stubs/phpcs.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<!-- ignore ERROR: Each class must be in a namespace of at least one level (a top-level vendor name) -->
1515
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
1616
<exclude-pattern>/database/migrations/</exclude-pattern>
17-
<exclude-pattern>/database/seeds/</exclude-pattern>
1817
</rule>
1918

2019
<!-- 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. -->

0 commit comments

Comments
 (0)