Skip to content

Commit afff3f9

Browse files
committed
Added Laravel 10 Support, Fix Unit Test
1 parent b7106e9 commit afff3f9

File tree

5 files changed

+20
-18
lines changed

5 files changed

+20
-18
lines changed

.github/workflows/fix-php-code-style-issues.yml .github/workflows/fix-styling.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Fix PHP code style issues
22

3-
on: [push]
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
47

58
jobs:
69
php-code-styling:
@@ -13,7 +16,7 @@ jobs:
1316
ref: ${{ github.head_ref }}
1417

1518
- name: Fix PHP code style issues
16-
uses: aglipanci/laravel-pint-action@1.0.0
19+
uses: aglipanci/laravel-pint-action@2.1.0
1720

1821
- name: Commit changes
1922
uses: stefanzweifel/git-auto-commit-action@v4

.github/workflows/run-tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ubuntu-latest, windows-latest]
16-
php: [8.1]
17-
laravel: [9.*]
16+
php: [8.1, 8.2]
17+
laravel: [10.*]
1818
stability: [prefer-lowest, prefer-stable]
1919
include:
20-
- laravel: 9.*
21-
testbench: 7.*
20+
- laravel: 10.*
21+
testbench: 8.*
2222

2323
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2424

composer.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818
"require": {
1919
"php": "^8.1",
2020
"doctrine/dbal": "^3.4",
21-
"illuminate/contracts": "^9.0",
22-
"spatie/laravel-package-tools": "^1.13.0"
21+
"illuminate/contracts": "^9.0 | ^10.0",
22+
"spatie/laravel-package-tools": "^1.14.0"
2323
},
2424
"require-dev": {
2525
"laravel/pint": "^1.0",
26-
"nunomaduro/collision": "^6.0",
26+
"nunomaduro/collision": "^7.0",
2727
"nunomaduro/larastan": "^2.0.1",
28-
"orchestra/testbench": "^7.0",
29-
"pestphp/pest": "^1.21",
30-
"pestphp/pest-plugin-laravel": "^1.1",
28+
"orchestra/testbench": "^8.0",
29+
"pestphp/pest": "^2.0",
30+
"pestphp/pest-plugin-laravel": "^2.0",
3131
"phpstan/extension-installer": "^1.1",
3232
"phpstan/phpstan-deprecation-rules": "^1.0",
3333
"phpstan/phpstan-phpunit": "^1.0",
34-
"phpunit/phpunit": "^9.5"
34+
"phpunit/phpunit": "^9.5 | ^10.0"
3535
},
3636
"autoload": {
3737
"psr-4": {

tests/LaravelDbDocTest.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
use Illuminate\Support\Facades\Route;
66
use Illuminate\Support\Facades\Storage;
77

8-
beforeEach(function () {
9-
LaravelDbDoc::routes();
10-
});
11-
128
it('has db:schema command', function () {
139
$this->assertTrue(in_array('db:schema', array_keys(Artisan::all())));
1410
});
@@ -35,4 +31,4 @@
3531
$this->assertTrue(
3632
Route::has('doc.db-schema')
3733
);
38-
})->markTestSkipped('Somehow the test did not find the router.');
34+
});

tests/TestCase.php

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Bekwoh\LaravelDbDoc\Tests;
44

5+
use Bekwoh\LaravelDbDoc\Facades\LaravelDbDoc;
56
use Bekwoh\LaravelDbDoc\LaravelDbDocServiceProvider;
67
use Illuminate\Database\Eloquent\Factories\Factory;
78
use Orchestra\Testbench\TestCase as Orchestra;
@@ -28,6 +29,8 @@ public function getEnvironmentSetUp($app)
2829
{
2930
config()->set('database.default', 'testing');
3031

32+
LaravelDbDoc::routes();
33+
3134
/*
3235
$migration = include __DIR__.'/../database/migrations/create_laravel-db-doc_table.php.stub';
3336
$migration->up();

0 commit comments

Comments
 (0)