Skip to content

Commit

Permalink
Added Laravel 10 Support, Fix Unit Test
Browse files Browse the repository at this point in the history
  • Loading branch information
nasrulhazim committed Feb 25, 2023
1 parent b7106e9 commit afff3f9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Fix PHP code style issues

on: [push]
on:
push:
paths:
- '**.php'

jobs:
php-code-styling:
Expand All @@ -13,7 +16,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@1.0.0
uses: aglipanci/laravel-pint-action@2.1.0

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1]
laravel: [9.*]
php: [8.1, 8.2]
laravel: [10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*

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

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
"require": {
"php": "^8.1",
"doctrine/dbal": "^3.4",
"illuminate/contracts": "^9.0",
"spatie/laravel-package-tools": "^1.13.0"
"illuminate/contracts": "^9.0 | ^10.0",
"spatie/laravel-package-tools": "^1.14.0"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^6.0",
"nunomaduro/collision": "^7.0",
"nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^7.0",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.5 | ^10.0"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 1 addition & 5 deletions tests/LaravelDbDocTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Storage;

beforeEach(function () {
LaravelDbDoc::routes();
});

it('has db:schema command', function () {
$this->assertTrue(in_array('db:schema', array_keys(Artisan::all())));
});
Expand All @@ -35,4 +31,4 @@
$this->assertTrue(
Route::has('doc.db-schema')
);
})->markTestSkipped('Somehow the test did not find the router.');
});
3 changes: 3 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Bekwoh\LaravelDbDoc\Tests;

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

LaravelDbDoc::routes();

/*
$migration = include __DIR__.'/../database/migrations/create_laravel-db-doc_table.php.stub';
$migration->up();
Expand Down

0 comments on commit afff3f9

Please sign in to comment.