Skip to content

Commit

Permalink
Merge pull request #5 from 3sidedcube/upgrade/laravel-11-php-83
Browse files Browse the repository at this point in the history
[upgrade] Support Laravel 11 & PHP 8.3
  • Loading branch information
wxllJK authored May 20, 2024
2 parents 8684ed2 + af9085a commit c33a563
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 23 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,21 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ 7.4, 8.0, 8.1 ]
laravel: [ ^8.0, ^9.0 ]
php: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
laravel: [ ^8.0, ^9.0, ^10.0, ^11.0 ]
exclude:
- php: 7.4
laravel: ^9.0
- php: 7.4
laravel: ^10.0
- php: 7.4
laravel: ^11.0
- php: 8.0
laravel: ^10.0
- php: 8.0
laravel: ^11.0
- php: 8.1
laravel: ^11.0

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

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
}
],
"require": {
"php": "^7.4|^8.0",
"illuminate/routing": "^8.0|^9.0",
"illuminate/support": "^8.0|^9.0"
"php": "^7.4|^8.0|^8.1|^8.2|^8.3",
"illuminate/routing": "^8.0|^9.0|^10.0|^11.0",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.3",
"orchestra/testbench": "^6.0|^7.0"
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0"
},
"autoload": {
"psr-4": {
Expand Down
14 changes: 14 additions & 0 deletions config/redoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@

'directory' => 'openapi',


/*
|--------------------------------------------------------------------------
| Middleware
|--------------------------------------------------------------------------
|
| Apply these middlewares to your docs.
|
*/

'middleware' => [
// 'auth',
],

/*
|--------------------------------------------------------------------------
| Variables
Expand Down
26 changes: 11 additions & 15 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.1/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
7 changes: 5 additions & 2 deletions routes/redoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
use ThreeSidedCube\LaravelRedoc\Http\Controllers\DocumentationController;
use ThreeSidedCube\LaravelRedoc\Http\Controllers\DefinitionController;

Route::get(config('redoc.path'), DocumentationController::class)->name('redoc.documentation');
Route::get(config('redoc.path') . '/definition', DefinitionController::class)->name('redoc.definition');
Route::group(['middleware' => config('redoc.middleware')], function() {

Route::get(config('redoc.path'), DocumentationController::class)->name('redoc.documentation');
Route::get(config('redoc.path') . '/definition', DefinitionController::class)->name('redoc.definition');
});

0 comments on commit c33a563

Please sign in to comment.