Skip to content

Commit

Permalink
Merge pull request #13 from TheDragonCode/3.x
Browse files Browse the repository at this point in the history
Laravel 9 support
  • Loading branch information
Andrey Helldar authored Jan 18, 2022
2 parents 22971c4 + 288b6ff commit cc7aaf7
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: phpunit
name: "Laravel 7"
on: [ push ]

jobs:
phpunit:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [ "7.3", "7.4", "8.0" ]
laravel: [ "^7.0", "^8.0" ]
laravel: [ "7.0" ]

name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}
name: PHP ${{ matrix.php }}

steps:
- name: Checkout code
Expand All @@ -22,10 +22,10 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv
coverage: xdebug
coverage: none

- name: Install dependencies
run: composer require --dev laravel/framework:${{ matrix.laravel }}
run: composer require --dev laravel/framework:^${{ matrix.laravel }}

- name: Execute tests
run: sudo vendor/bin/phpunit
31 changes: 31 additions & 0 deletions .github/workflows/laravel-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Laravel 8"
on: [ push ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [ "7.3", "7.4", "8.0", "8.1" ]
laravel: [ "8.0" ]

name: PHP ${{ matrix.php }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv
coverage: none

- name: Install dependencies
run: composer require --dev laravel/framework:^${{ matrix.laravel }}

- name: Execute tests
run: sudo vendor/bin/phpunit
32 changes: 32 additions & 0 deletions .github/workflows/laravel-9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Laravel 9"
on: [ push ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [ "8.0", "8.1" ]
laravel: [ "9.0" ]

name: PHP ${{ matrix.php }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv
coverage: none

- name: Install dependencies
run: |
composer require laravel/framework:^${{ matrix.laravel }}
composer update --prefer-stable --prefer-dist --no-progress --no-interaction
- name: Execute tests
run: sudo vendor/bin/phpunit
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Instead, you may of course manually update your require block and run `composer
```json
{
"require": {
"dragon-code/extended-routes": "^3.0"
"dragon-code/extended-routes": "^3.1"
}
}
```
Expand Down Expand Up @@ -84,15 +84,15 @@ app('router')->apiRestorableResource('foos', FoosController::class);
Route::apiRestorableResource('foos', FoosController::class);
```

| Method | URI | Name | Action | Middleware |
|---|---|---|---|---|
| GET/HEAD | api/foos | foos.index | App\Http\Controllers\FoosController@index | api |
| POST | api/foos | foos.store | App\Http\Controllers\FoosController@store | api |
| GET/HEAD | api/foos/trashed | foos.trashed | App\Http\Controllers\FoosController@trashed | api |
| GET/HEAD | api/foos/{foo} | foos.show | App\Http\Controllers\FoosController@show | api |
| PUT/PATCH | api/foos/{foo} | foos.update | App\Http\Controllers\FoosController@update | api |
| DELETE | api/foos/{foo} | foos.destroy | App\Http\Controllers\FoosController@destroy | api |
| POST | api/foos/{foo}/restore | foos.restore | App\Http\Controllers\FoosController@restore | api |
| Method | URI | Name | Action | Middleware |
|-----------|------------------------|--------------|---------------------------------------------|------------|
| GET/HEAD | api/foos | foos.index | App\Http\Controllers\FoosController@index | api |
| POST | api/foos | foos.store | App\Http\Controllers\FoosController@store | api |
| GET/HEAD | api/foos/trashed | foos.trashed | App\Http\Controllers\FoosController@trashed | api |
| GET/HEAD | api/foos/{foo} | foos.show | App\Http\Controllers\FoosController@show | api |
| PUT/PATCH | api/foos/{foo} | foos.update | App\Http\Controllers\FoosController@update | api |
| DELETE | api/foos/{foo} | foos.destroy | App\Http\Controllers\FoosController@destroy | api |
| POST | api/foos/{foo}/restore | foos.restore | App\Http\Controllers\FoosController@restore | api |

## License

Expand Down
35 changes: 22 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"name": "dragon-code/extended-routes",
"description": "This helper extends the standard set of resource routing methods to work with SoftDeletes and other extends",
"type": "library",
"license": "MIT",
"keywords": ["extended routes", "resource", "routes", "router", "laravel", "dragon-code", "dragon", "andrey-helldar"],
"support": {
"issues": "https://github.com/TheDragonCode/extended-routes/issues",
"source": "https://github.com/TheDragonCode/extended-routes"
},
"type": "library",
"keywords": [
"extended routes",
"resource",
"routes",
"router",
"laravel",
"dragon-code",
"dragon",
"andrey-helldar"
],
"authors": [
{
"name": "Andrey Helldar",
Expand All @@ -18,16 +23,22 @@
"email": "ellrion11@gmail.com"
}
],
"support": {
"issues": "https://github.com/TheDragonCode/extended-routes/issues",
"source": "https://github.com/TheDragonCode/extended-routes"
},
"require": {
"php": "^7.3|^8.0",
"illuminate/routing": "^7.0|^8.0",
"illuminate/support": "^7.0|^8.0",
"illuminate/database": "^7.0|^8.0"
"php": "^7.3 || ^8.0",
"illuminate/database": "^7.0 || ^8.0 || ^9.0",
"illuminate/routing": "^7.0 || ^8.0 || ^9.0",
"illuminate/support": "^7.0 || ^8.0 || ^9.0"
},
"require-dev": {
"orchestra/testbench": "^5.0|^6.0",
"orchestra/testbench": "^5.0 || ^6.0 || ^7.0",
"phpunit/phpunit": "^9.0"
},
"minimum-stability": "stable",
"prefer-stable": true,
"autoload": {
"psr-4": {
"DragonCode\\ExtendedRoutes\\": "src"
Expand All @@ -41,8 +52,6 @@
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable",
"prefer-stable": true,
"extra": {
"laravel": {
"providers": [
Expand Down

0 comments on commit cc7aaf7

Please sign in to comment.