Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6] Change Resource name away from soft-reserved name #22969

Merged
merged 1 commit into from
Feb 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Illuminate\Http\Resources\DelegatesToResource;
use Illuminate\Http\Resources\ConditionallyLoadsAttributes;

class Resource implements ArrayAccess, JsonSerializable, Responsable, UrlRoutable
class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRoutable
{
use ConditionallyLoadsAttributes, DelegatesToResource;

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Http/Resources/Json/ResourceCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Pagination\AbstractPaginator;
use Illuminate\Http\Resources\CollectsResources;

class ResourceCollection extends Resource implements IteratorAggregate
class ResourceCollection extends JsonResource implements IteratorAggregate
{
use CollectsResources;

Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/Http/Fixtures/AuthorResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Illuminate\Tests\Integration\Http\Fixtures;

use Illuminate\Http\Resources\Json\Resource;
use Illuminate\Http\Resources\Json\JsonResource;

class AuthorResource extends Resource
class AuthorResource extends JsonResource
{
public function toArray($request)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/Http/Fixtures/PostResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Illuminate\Tests\Integration\Http\Fixtures;

use Illuminate\Http\Resources\Json\Resource;
use Illuminate\Http\Resources\Json\JsonResource;

class PostResource extends Resource
class PostResource extends JsonResource
{
public function toArray($request)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Illuminate\Tests\Integration\Http\Fixtures;

use Illuminate\Http\Resources\Json\Resource;
use Illuminate\Http\Resources\Json\JsonResource;

class PostResourceWithOptionalData extends Resource
class PostResourceWithOptionalData extends JsonResource
{
public function toArray($request)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Illuminate\Tests\Integration\Http\Fixtures;

use Illuminate\Http\Resources\Json\Resource;
use Illuminate\Http\Resources\Json\JsonResource;

class PostResourceWithOptionalMerging extends Resource
class PostResourceWithOptionalMerging extends JsonResource
{
public function toArray($request)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/Http/Fixtures/ReallyEmptyPostResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Illuminate\Tests\Integration\Http\Fixtures;

use Illuminate\Http\Resources\Json\Resource;
use Illuminate\Http\Resources\Json\JsonResource;

class ReallyEmptyPostResource extends Resource
class ReallyEmptyPostResource extends JsonResource
{
//
}
4 changes: 2 additions & 2 deletions tests/Integration/Http/Fixtures/SerializablePostResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Illuminate\Tests\Integration\Http\Fixtures;

use Illuminate\Http\Resources\Json\Resource;
use Illuminate\Http\Resources\Json\JsonResource;

class SerializablePostResource extends Resource
class SerializablePostResource extends JsonResource
{
public function toArray($request)
{
Expand Down