From 79ddd0393464ced728e012a6b5f454ce183187d5 Mon Sep 17 00:00:00 2001 From: Christopher Gammie Date: Fri, 9 Feb 2024 18:50:41 +0000 Subject: [PATCH 1/4] build: update github actions for php 8.3 --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cdc7504..3d8abe3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,12 +14,12 @@ jobs: strategy: fail-fast: true matrix: - php: [8.1, 8.2] + php: [8.1, 8.2, 8.3] laravel: [10] steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -34,7 +34,7 @@ jobs: run: composer require "laravel/framework:^${{ matrix.laravel }}" --no-update - name: Install dependencies - uses: nick-fields/retry@v2 + uses: nick-fields/retry@v3 with: timeout_minutes: 5 max_attempts: 5 From 33376780f8152be1961d1fb4a26dc7db576f1f43 Mon Sep 17 00:00:00 2001 From: Christopher Gammie Date: Sat, 10 Feb 2024 12:00:26 +0000 Subject: [PATCH 2/4] feat: allow middleware registration per action on resource and relations Closes #265 --- CHANGELOG.md | 5 + .../PendingRelationshipRegistration.php | 25 ++++- src/Routing/PendingResourceRegistration.php | 19 +++- src/Routing/RelationshipRegistrar.php | 22 ++++- src/Routing/ResourceRegistrar.php | 24 ++++- tests/lib/Integration/Routing/HasManyTest.php | 86 ++++++++++++++++- tests/lib/Integration/Routing/HasOneTest.php | 88 ++++++++++++++++- .../lib/Integration/Routing/ResourceTest.php | 96 ++++++++++++++++++- 8 files changed, 344 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38dfa04..6f7e4aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. This projec ## Unreleased +### Added + +- [#265](https://github.com/laravel-json-api/laravel/issues/265) Allow registration of middleware per action on both + resource routes and relationship routes. + ## [3.2.0] - 2023-11-08 ### Added diff --git a/src/Routing/PendingRelationshipRegistration.php b/src/Routing/PendingRelationshipRegistration.php index d0a5934..b10c97d 100644 --- a/src/Routing/PendingRelationshipRegistration.php +++ b/src/Routing/PendingRelationshipRegistration.php @@ -20,6 +20,7 @@ namespace LaravelJsonApi\Laravel\Routing; use Illuminate\Routing\RouteCollection; +use Illuminate\Support\Arr; class PendingRelationshipRegistration { @@ -155,12 +156,30 @@ public function name(string $method, string $name): self /** * Add middleware to the resource routes. * - * @param string ...$middleware + * @param mixed ...$middleware * @return $this */ - public function middleware(string ...$middleware): self + public function middleware(...$middleware): self { - $this->options['middleware'] = $middleware; + if (count($middleware) === 1) { + $middleware = Arr::wrap($middleware[0]); + } + + if (array_is_list($middleware)) { + $this->options['middleware'] = $middleware; + return $this; + } + + $this->options['middleware'] = Arr::wrap($middleware['*'] ?? null); + + foreach ($this->map as $alias => $action) { + if (isset($middleware[$alias])) { + $middleware[$action] = $middleware[$alias]; + unset($middleware[$alias]); + } + } + + $this->options['action_middleware'] = $middleware; return $this; } diff --git a/src/Routing/PendingResourceRegistration.php b/src/Routing/PendingResourceRegistration.php index d07c8f3..9969690 100644 --- a/src/Routing/PendingResourceRegistration.php +++ b/src/Routing/PendingResourceRegistration.php @@ -21,6 +21,7 @@ use Closure; use Illuminate\Routing\RouteCollection; +use Illuminate\Support\Arr; use InvalidArgumentException; use function is_string; @@ -180,12 +181,22 @@ public function parameter(string $parameter): self /** * Add middleware to the resource routes. * - * @param string ...$middleware + * @param mixed ...$middleware * @return $this */ - public function middleware(string ...$middleware): self + public function middleware(...$middleware): self { - $this->options['middleware'] = $middleware; + if (count($middleware) === 1) { + $middleware = Arr::wrap($middleware[0]); + } + + if (array_is_list($middleware)) { + $this->options['middleware'] = $middleware; + return $this; + } + + $this->options['middleware'] = Arr::wrap($middleware['*'] ?? null); + $this->options['action_middleware'] = $middleware; return $this; } @@ -196,7 +207,7 @@ public function middleware(string ...$middleware): self * @param string ...$middleware * @return $this */ - public function withoutMiddleware(string ...$middleware) + public function withoutMiddleware(string ...$middleware): self { $this->options['excluded_middleware'] = array_merge( (array) ($this->options['excluded_middleware'] ?? []), diff --git a/src/Routing/RelationshipRegistrar.php b/src/Routing/RelationshipRegistrar.php index a9aae8a..2aa2363 100644 --- a/src/Routing/RelationshipRegistrar.php +++ b/src/Routing/RelationshipRegistrar.php @@ -22,6 +22,7 @@ use Illuminate\Contracts\Routing\Registrar as RegistrarContract; use Illuminate\Routing\Route as IlluminateRoute; use Illuminate\Routing\RouteCollection; +use Illuminate\Support\Arr; use LaravelJsonApi\Contracts\Schema\Schema; use LaravelJsonApi\Core\Support\Str; @@ -272,9 +273,10 @@ private function getRelationshipAction( $name = $this->getRelationRouteName($method, $defaultName, $options); $action = ['as' => $name, 'uses' => $this->controller.'@'.$method]; + $middleware = $this->getMiddleware($method, $options); - if (isset($options['middleware'])) { - $action['middleware'] = $options['middleware']; + if (!empty($middleware)) { + $action['middleware'] = $middleware; } if (isset($options['excluded_middleware'])) { @@ -284,6 +286,22 @@ private function getRelationshipAction( return $action; } + /** + * @param string $action + * @param array $options + * @return array + */ + private function getMiddleware(string $action, array $options): array + { + $all = $options['middleware'] ?? []; + $actions = $options['action_middleware'] ?? []; + + return [ + ...$all, + ...Arr::wrap($actions[$action] ?? null), + ]; + } + /** * @param string $fieldName * @return string diff --git a/src/Routing/ResourceRegistrar.php b/src/Routing/ResourceRegistrar.php index bde73d8..495a69a 100644 --- a/src/Routing/ResourceRegistrar.php +++ b/src/Routing/ResourceRegistrar.php @@ -23,6 +23,7 @@ use Illuminate\Contracts\Routing\Registrar as RegistrarContract; use Illuminate\Routing\Route as IlluminateRoute; use Illuminate\Routing\RouteCollection; +use Illuminate\Support\Arr; use LaravelJsonApi\Contracts\Server\Server; use LaravelJsonApi\Core\Support\Str; @@ -337,13 +338,14 @@ private function getResourceAction( string $method, ?string $parameter, array $options - ) { + ): array { $name = $this->getResourceRouteName($resourceType, $method, $options); $action = ['as' => $name, 'uses' => $controller.'@'.$method]; + $middleware = $this->getMiddleware($method, $options); - if (isset($options['middleware'])) { - $action['middleware'] = $options['middleware']; + if (!empty($middleware)) { + $action['middleware'] = $middleware; } if (isset($options['excluded_middleware'])) { @@ -355,6 +357,22 @@ private function getResourceAction( return $action; } + /** + * @param string $action + * @param array $options + * @return array + */ + private function getMiddleware(string $action, array $options): array + { + $all = $options['middleware'] ?? []; + $actions = $options['action_middleware'] ?? []; + + return [ + ...$all, + ...Arr::wrap($actions[$action] ?? null), + ]; + } + /** * Get the action array for the relationships group. * diff --git a/tests/lib/Integration/Routing/HasManyTest.php b/tests/lib/Integration/Routing/HasManyTest.php index 16c3777..f2b28d5 100644 --- a/tests/lib/Integration/Routing/HasManyTest.php +++ b/tests/lib/Integration/Routing/HasManyTest.php @@ -144,13 +144,95 @@ public function testMiddleware(string $method, string $uri): void ->middleware('foo') ->resources(function ($server) { $server->resource('posts')->middleware('bar')->relationships(function ($relations) { - $relations->hasMany('tags')->middleware('baz'); + $relations->hasMany('tags')->middleware('baz1', 'baz2'); }); }); }); $route = $this->assertMatch($method, $uri); - $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar', 'baz'], $route->action['middleware']); + $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar', 'baz1', 'baz2'], $route->action['middleware']); + } + + /** + * @param string $method + * @param string $uri + * @dataProvider genericProvider + */ + public function testMiddlewareAsArrayList(string $method, string $uri): void + { + $server = $this->createServer('v1'); + $schema = $this->createSchema($server, 'posts', '\d+'); + $this->createRelation($schema, 'tags'); + + $this->defaultApiRoutesWithNamespace(function () { + JsonApiRoute::server('v1') + ->prefix('v1') + ->namespace('Api\\V1') + ->middleware('foo') + ->resources(function ($server) { + $server->resource('posts')->middleware('bar')->relationships(function ($relations) { + $relations->hasMany('tags')->middleware(['baz1', 'baz2']); + }); + }); + }); + + $route = $this->assertMatch($method, $uri); + $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar', 'baz1', 'baz2'], $route->action['middleware']); + } + + /** + * @param string $method + * @param string $uri + * @param string $action + * @dataProvider genericProvider + */ + public function testActionMiddleware(string $method, string $uri, string $action): void + { + $actions = [ + '*' => ['baz1', 'baz2'], + 'showRelated' => 'showRelated1', + 'showRelationship' => ['showRelationship1', 'showRelationship2'], + 'updateRelationship' => 'updateRelationship1', + 'attachRelationship' => ['attachRelationship1', 'attachRelationship2'], + 'detachRelationship' => 'detachRelationship1', + ]; + + $expected = [ + 'api', + 'jsonapi:v1', + 'foo', + 'bar', + ...$actions['*'], + ...Arr::wrap($actions[$action]), + ]; + + $server = $this->createServer('v1'); + $schema = $this->createSchema($server, 'posts', '\d+'); + $this->createRelation($schema, 'tags'); + + $this->defaultApiRoutesWithNamespace(function () use ($actions) { + JsonApiRoute::server('v1') + ->prefix('v1') + ->namespace('Api\\V1') + ->middleware('foo') + ->resources(function ($server) use ($actions) { + $server->resource('posts')->middleware('bar')->relationships( + function ($relations) use ($actions) { + $relations->hasMany('tags')->middleware([ + '*' => $actions['*'], + 'related' => $actions['showRelated'], + 'show' => $actions['showRelationship'], + 'update' => $actions['updateRelationship'], + 'attach' => $actions['attachRelationship'], + 'detach' => $actions['detachRelationship'], + ]); + }, + ); + }); + }); + + $route = $this->assertMatch($method, $uri); + $this->assertSame($expected, $route->action['middleware']); } /** diff --git a/tests/lib/Integration/Routing/HasOneTest.php b/tests/lib/Integration/Routing/HasOneTest.php index 8a85cc6..3861988 100644 --- a/tests/lib/Integration/Routing/HasOneTest.php +++ b/tests/lib/Integration/Routing/HasOneTest.php @@ -22,6 +22,8 @@ use Illuminate\Contracts\Routing\Registrar; use LaravelJsonApi\Core\Support\Arr; use LaravelJsonApi\Laravel\Facades\JsonApiRoute; +use LaravelJsonApi\Laravel\Routing\Relationships; +use LaravelJsonApi\Laravel\Routing\ResourceRegistrar; class HasOneTest extends TestCase { @@ -117,11 +119,9 @@ public function testName(string $method, string $uri, string $action): void /** * @param string $method * @param string $uri - * @param string $action - * @param string $name * @dataProvider genericProvider */ - public function testMiddleware(string $method, string $uri, string $action, string $name): void + public function testMiddleware(string $method, string $uri): void { $server = $this->createServer('v1'); $schema = $this->createSchema($server, 'posts', '\d+'); @@ -134,13 +134,91 @@ public function testMiddleware(string $method, string $uri, string $action, stri ->middleware('foo') ->resources(function ($server) { $server->resource('posts')->middleware('bar')->relationships(function ($relations) { - $relations->hasOne('author')->middleware('baz'); + $relations->hasOne('author')->middleware('baz1', 'baz2'); }); }); }); $route = $this->assertMatch($method, $uri); - $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar', 'baz'], $route->action['middleware']); + $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar', 'baz1', 'baz2'], $route->action['middleware']); + } + + /** + * @param string $method + * @param string $uri + * @dataProvider genericProvider + */ + public function testMiddlewareAsArrayList(string $method, string $uri): void + { + $server = $this->createServer('v1'); + $schema = $this->createSchema($server, 'posts', '\d+'); + $this->createRelation($schema, 'author'); + + $this->defaultApiRoutesWithNamespace(function () { + JsonApiRoute::server('v1') + ->prefix('v1') + ->namespace('Api\\V1') + ->middleware('foo') + ->resources(function (ResourceRegistrar $server) { + $server->resource('posts')->middleware('bar')->relationships(function (Relationships $relations) { + $relations->hasOne('author')->middleware(['baz1', 'baz2']); + }); + }); + }); + + $route = $this->assertMatch($method, $uri); + $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar', 'baz1', 'baz2'], $route->action['middleware']); + } + + /** + * @param string $method + * @param string $uri + * @param string $action + * @dataProvider genericProvider + */ + public function testActionMiddleware(string $method, string $uri, string $action): void + { + $actions = [ + '*' => ['baz1', 'baz2'], + 'showRelated' => 'showRelated1', + 'showRelationship' => ['showRelationship1', 'showRelationship2'], + 'updateRelationship' => 'updateRelationship1', + ]; + + $expected = [ + 'api', + 'jsonapi:v1', + 'foo', + 'bar', + ...$actions['*'], + ...Arr::wrap($actions[$action]), + ]; + + $server = $this->createServer('v1'); + $schema = $this->createSchema($server, 'posts', '\d+'); + $this->createRelation($schema, 'author'); + + $this->defaultApiRoutesWithNamespace(function () use ($actions) { + JsonApiRoute::server('v1') + ->prefix('v1') + ->namespace('Api\\V1') + ->middleware('foo') + ->resources(function (ResourceRegistrar $server) use ($actions) { + $server->resource('posts')->middleware('bar')->relationships( + function (Relationships $relations) use ($actions) { + $relations->hasOne('author')->middleware([ + '*' => $actions['*'], + 'related' => $actions['showRelated'], + 'show' => $actions['showRelationship'], + 'update' => $actions['updateRelationship'], + ]); + }, + ); + }); + }); + + $route = $this->assertMatch($method, $uri); + $this->assertSame($expected, $route->action['middleware']); } /** diff --git a/tests/lib/Integration/Routing/ResourceTest.php b/tests/lib/Integration/Routing/ResourceTest.php index 2dad057..c657f42 100644 --- a/tests/lib/Integration/Routing/ResourceTest.php +++ b/tests/lib/Integration/Routing/ResourceTest.php @@ -23,6 +23,7 @@ use Illuminate\Contracts\Routing\Registrar; use LaravelJsonApi\Core\Support\Arr; use LaravelJsonApi\Laravel\Facades\JsonApiRoute; +use LaravelJsonApi\Laravel\Routing\ResourceRegistrar; class ResourceTest extends TestCase { @@ -217,14 +218,14 @@ public function testServerMiddleware(string $method, string $uri): void JsonApiRoute::server('v1') ->prefix('v1') ->namespace('Api\\V1') - ->middleware('foo') + ->middleware('foo', 'bar') ->resources(function ($server) { $server->resource('posts'); }); }); $route = $this->assertMatch($method, $uri); - $this->assertSame(['api', 'jsonapi:v1', 'foo'], $route->action['middleware']); + $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar'], $route->action['middleware']); } /** @@ -251,6 +252,97 @@ public function testResourceMiddleware(string $method, string $uri): void $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar'], $route->action['middleware']); } + /** + * @param string $method + * @param string $uri + * @dataProvider routeProvider + */ + public function testResourceWithMultipleMiddleware(string $method, string $uri): void + { + $server = $this->createServer('v1'); + $this->createSchema($server, 'posts', '\d+'); + + $this->defaultApiRoutesWithNamespace(function () { + JsonApiRoute::server('v1') + ->prefix('v1') + ->namespace('Api\\V1') + ->middleware('foo') + ->resources(function ($server) { + $server->resource('posts')->middleware('bar1', 'bar2'); + }); + }); + + $route = $this->assertMatch($method, $uri); + $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar1', 'bar2'], $route->action['middleware']); + } + + /** + * @param string $method + * @param string $uri + * @dataProvider routeProvider + */ + public function testResourceMiddlewareArrayList(string $method, string $uri): void + { + $server = $this->createServer('v1'); + $this->createSchema($server, 'posts', '\d+'); + + $this->defaultApiRoutesWithNamespace(function () { + JsonApiRoute::server('v1') + ->prefix('v1') + ->namespace('Api\\V1') + ->middleware('foo') + ->resources(function (ResourceRegistrar $server) { + $server->resource('posts')->middleware(['bar1', 'bar2']); + }); + }); + + $route = $this->assertMatch($method, $uri); + $this->assertSame(['api', 'jsonapi:v1', 'foo', 'bar1', 'bar2'], $route->action['middleware']); + } + + + /** + * @param string $method + * @param string $uri + * @param string $action + * @dataProvider routeProvider + */ + public function testResourceActionMiddleware(string $method, string $uri, string $action): void + { + $actions = [ + '*' => ['bar1', 'bar2'], + 'index' => 'index1', + 'store' => ['store1', 'store2'], + 'show' => ['show1'], + 'update' => 'update1', + 'destroy' => 'destroy1', + ]; + + $expected = [ + 'api', + 'jsonapi:v1', + 'foo', + ...$actions['*'], + ...Arr::wrap($actions[$action]), + ]; + + $server = $this->createServer('v1'); + $this->createSchema($server, 'posts', '\d+'); + + $this->defaultApiRoutesWithNamespace(function () use ($actions) { + JsonApiRoute::server('v1') + ->prefix('v1') + ->namespace('Api\\V1') + ->middleware('foo') + ->resources(function (ResourceRegistrar $server) use ($actions) { + $server->resource('posts')->middleware($actions); + }); + }); + + $route = $this->assertMatch($method, $uri); + $this->assertSame($expected, $route->action['middleware']); + } + /** * @param string $method * @param string $uri From 0e10208827acae7281a952efaf870acbd3c668b7 Mon Sep 17 00:00:00 2001 From: Christopher Gammie Date: Wed, 14 Feb 2024 19:09:51 +0000 Subject: [PATCH 3/4] docs: update copyright notices --- src/Console/Concerns/ResolvesStub.php | 2 +- src/Console/GeneratorCommand.php | 2 +- src/Console/MakeAuthorizer.php | 2 +- src/Console/MakeController.php | 2 +- src/Console/MakeFilter.php | 2 +- src/Console/MakeQuery.php | 2 +- src/Console/MakeRequest.php | 2 +- src/Console/MakeRequests.php | 2 +- src/Console/MakeResource.php | 2 +- src/Console/MakeSchema.php | 2 +- src/Console/MakeServer.php | 2 +- src/Console/MakeSortField.php | 2 +- src/Console/StubPublish.php | 2 +- src/Exceptions/HttpNotAcceptableException.php | 2 +- src/Exceptions/HttpUnsupportedMediaTypeException.php | 2 +- src/Facades/JsonApiRoute.php | 2 +- src/Http/Controllers/Actions/AttachRelationship.php | 2 +- src/Http/Controllers/Actions/Destroy.php | 2 +- src/Http/Controllers/Actions/DetachRelationship.php | 2 +- src/Http/Controllers/Actions/FetchMany.php | 2 +- src/Http/Controllers/Actions/FetchOne.php | 2 +- src/Http/Controllers/Actions/FetchRelated.php | 2 +- src/Http/Controllers/Actions/FetchRelationship.php | 2 +- src/Http/Controllers/Actions/Store.php | 2 +- src/Http/Controllers/Actions/Update.php | 2 +- src/Http/Controllers/Actions/UpdateRelationship.php | 2 +- src/Http/Controllers/JsonApiController.php | 2 +- src/Http/Middleware/BootJsonApi.php | 2 +- src/Http/Requests/AnonymousCollectionQuery.php | 2 +- src/Http/Requests/AnonymousQuery.php | 2 +- src/Http/Requests/FormRequest.php | 2 +- src/Http/Requests/RequestResolver.php | 2 +- src/Http/Requests/ResourceQuery.php | 2 +- src/Http/Requests/ResourceRequest.php | 2 +- src/LaravelJsonApi.php | 2 +- src/Routing/ActionProxy.php | 2 +- src/Routing/ActionRegistrar.php | 2 +- src/Routing/PendingRelationshipRegistration.php | 2 +- src/Routing/PendingResourceRegistration.php | 2 +- src/Routing/PendingServerRegistration.php | 2 +- src/Routing/Registrar.php | 2 +- src/Routing/RelationshipRegistrar.php | 2 +- src/Routing/Relationships.php | 2 +- src/Routing/ResourceRegistrar.php | 2 +- src/Routing/Route.php | 2 +- src/ServiceProvider.php | 2 +- tests/dummy/app/Http/Controllers/Api/V1/PostController.php | 2 +- tests/dummy/app/Http/Controllers/Api/V1/UserController.php | 2 +- tests/dummy/app/Http/Controllers/Api/V1/VideoController.php | 2 +- tests/dummy/app/Http/Controllers/Controller.php | 2 +- tests/dummy/app/JsonApi/V1/Comments/CommentSchema.php | 2 +- tests/dummy/app/JsonApi/V1/Images/ImageSchema.php | 2 +- tests/dummy/app/JsonApi/V1/Media/MediaCollectionQuery.php | 2 +- tests/dummy/app/JsonApi/V1/Phones/PhoneSchema.php | 2 +- tests/dummy/app/JsonApi/V1/Posts/PostCollectionQuery.php | 2 +- tests/dummy/app/JsonApi/V1/Posts/PostQuery.php | 2 +- tests/dummy/app/JsonApi/V1/Posts/PostRequest.php | 2 +- tests/dummy/app/JsonApi/V1/Posts/PostSchema.php | 2 +- tests/dummy/app/JsonApi/V1/Posts/PostScope.php | 2 +- tests/dummy/app/JsonApi/V1/Server.php | 2 +- tests/dummy/app/JsonApi/V1/Tags/TagSchema.php | 2 +- tests/dummy/app/JsonApi/V1/Users/UserQuery.php | 2 +- tests/dummy/app/JsonApi/V1/Users/UserRequest.php | 2 +- tests/dummy/app/JsonApi/V1/Users/UserSchema.php | 2 +- tests/dummy/app/JsonApi/V1/Videos/VideoRequest.php | 2 +- tests/dummy/app/JsonApi/V1/Videos/VideoSchema.php | 2 +- tests/dummy/app/Models/Comment.php | 2 +- tests/dummy/app/Models/Image.php | 2 +- tests/dummy/app/Models/Phone.php | 2 +- tests/dummy/app/Models/Post.php | 2 +- tests/dummy/app/Models/Tag.php | 2 +- tests/dummy/app/Models/User.php | 2 +- tests/dummy/app/Models/Video.php | 2 +- tests/dummy/app/Policies/PostPolicy.php | 2 +- tests/dummy/app/Policies/UserPolicy.php | 2 +- tests/dummy/app/Policies/VideoPolicy.php | 2 +- tests/dummy/app/Providers/AppServiceProvider.php | 2 +- tests/dummy/app/Providers/AuthServiceProvider.php | 2 +- tests/dummy/app/Providers/EventServiceProvider.php | 2 +- tests/dummy/app/Providers/RouteServiceProvider.php | 2 +- tests/dummy/config/jsonapi.php | 2 +- tests/dummy/database/factories/CommentFactory.php | 2 +- tests/dummy/database/factories/ImageFactory.php | 2 +- tests/dummy/database/factories/PhoneFactory.php | 2 +- tests/dummy/database/factories/PostFactory.php | 2 +- tests/dummy/database/factories/TagFactory.php | 2 +- tests/dummy/database/factories/UserFactory.php | 2 +- tests/dummy/database/factories/VideoFactory.php | 2 +- .../2020_06_13_143800_create_post_and_video_tables.php | 2 +- .../migrations/2022_06_25_115000_create_phones_table.php | 2 +- tests/dummy/routes/api.php | 2 +- tests/dummy/routes/web.php | 2 +- tests/dummy/tests/Api/V1/Posts/Actions/PublishTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/Actions/PurgeTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/AttachMediaTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/AttachTagsTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/CreateTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/DeleteTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/DetachMediaTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/DetachTagsTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/IndexTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/ReadAuthorIdentifierTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/ReadAuthorTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/ReadCommentIdentifiersTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/ReadCommentsTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/ReadMediaTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/ReadTagIdentifiersTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/ReadTagsTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/ReadTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/UpdateMediaTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/UpdateTagsTest.php | 2 +- tests/dummy/tests/Api/V1/Posts/UpdateTest.php | 2 +- tests/dummy/tests/Api/V1/Serializer.php | 2 +- tests/dummy/tests/Api/V1/TestCase.php | 2 +- tests/dummy/tests/Api/V1/Users/ReadTest.php | 2 +- tests/dummy/tests/Api/V1/Users/UpdatePhoneTest.php | 2 +- tests/dummy/tests/Api/V1/Videos/CreateTest.php | 2 +- tests/dummy/tests/TestCase.php | 2 +- tests/lib/Acceptance/DefaultIncludePaths/Test.php | 2 +- tests/lib/Acceptance/DefaultIncludePaths/TestRequest.php | 2 +- tests/lib/Acceptance/Relationships/ToManyLinksTest.php | 2 +- tests/lib/Acceptance/Relationships/ToOneLinksTest.php | 2 +- tests/lib/Acceptance/RequestBodyContentTest.php | 2 +- tests/lib/Acceptance/ResponseTest.php | 2 +- tests/lib/Acceptance/TestCase.php | 2 +- tests/lib/Integration/Console/MakeAuthorizerTest.php | 2 +- tests/lib/Integration/Console/MakeControllerTest.php | 2 +- tests/lib/Integration/Console/MakeFilterTest.php | 2 +- tests/lib/Integration/Console/MakeQueryTest.php | 2 +- tests/lib/Integration/Console/MakeRequestTest.php | 2 +- tests/lib/Integration/Console/MakeRequestsTest.php | 2 +- tests/lib/Integration/Console/MakeResourceTest.php | 2 +- tests/lib/Integration/Console/MakeSchemaTest.php | 2 +- tests/lib/Integration/Console/MakeServerTest.php | 2 +- tests/lib/Integration/Console/MakeSortFieldTest.php | 2 +- tests/lib/Integration/Console/StubPublishTest.php | 2 +- tests/lib/Integration/Routing/ActionsTest.php | 2 +- tests/lib/Integration/Routing/HasManyTest.php | 2 +- tests/lib/Integration/Routing/HasOneTest.php | 2 +- tests/lib/Integration/Routing/ResourceTest.php | 2 +- tests/lib/Integration/Routing/TestCase.php | 2 +- tests/lib/Integration/TestCase.php | 2 +- tests/lib/Unit/PackageTest.php | 2 +- 143 files changed, 143 insertions(+), 143 deletions(-) diff --git a/src/Console/Concerns/ResolvesStub.php b/src/Console/Concerns/ResolvesStub.php index fc63283..547c93f 100644 --- a/src/Console/Concerns/ResolvesStub.php +++ b/src/Console/Concerns/ResolvesStub.php @@ -1,6 +1,6 @@ Date: Wed, 14 Feb 2024 19:10:33 +0000 Subject: [PATCH 4/4] docs: update changelog and bump version --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f7e4aa..c4ba7c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. This projec ## Unreleased +## [3.2.0] - 2024-02-14 + ### Added - [#265](https://github.com/laravel-json-api/laravel/issues/265) Allow registration of middleware per action on both pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy