diff --git a/README.md b/README.md index 1dfe882..84037e0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Make your Laravel API [JSON:API](https://jsonapi.org/) compliant with the `Brainstud\JsonApi` package. +Specific V4 Branch! + ## Table of contents - [Installation](#installation) diff --git a/composer.json b/composer.json index 9072ebe..f89317a 100644 --- a/composer.json +++ b/composer.json @@ -1,29 +1,29 @@ { - "name": "brainstud/json-api-resource", - "description": "Build JSON:API compliant Laravel API resources", - "minimum-stability": "dev", - "prefer-stable": true, - "license": "MIT", - "require": { - "php": "^8.2", - "laravel/framework": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0" - }, - "autoload": { - "psr-4": { - "Brainstud\\JsonApi\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Brainstud\\JsonApi\\Tests\\": "tests" - } - }, - "scripts": { - "test": "./vendor/bin/phpunit --configuration ./phpunit.xml" - }, - "require-dev": { - "phpunit/phpunit": "^9.6.3", - "orchestra/testbench": "^7.22.0", - "laravel/pint": "^1.22.0" + "name": "brainstud/json-api-resource", + "description": "Build JSON:API compliant Laravel API resources", + "minimum-stability": "dev", + "prefer-stable": true, + "license": "MIT", + "require": { + "php": "^8.2", + "laravel/framework": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0, <12.45.0" + }, + "autoload": { + "psr-4": { + "Brainstud\\JsonApi\\": "src/" } + }, + "autoload-dev": { + "psr-4": { + "Brainstud\\JsonApi\\Tests\\": "tests" + } + }, + "scripts": { + "test": "./vendor/bin/phpunit --configuration ./phpunit.xml" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.3", + "orchestra/testbench": "^7.22.0", + "laravel/pint": "^1.22.0" + } } diff --git a/src/Resources/JsonApiResource.php b/src/Resources/JsonApiResource.php index 1956e8c..8e6bceb 100644 --- a/src/Resources/JsonApiResource.php +++ b/src/Resources/JsonApiResource.php @@ -185,7 +185,7 @@ protected function getType(): string * Default to either `registerData['attributes']` or an empty array. * Should be overwritten to create custom attributes. */ - public function toAttributes(Request $request): array + protected function toAttributes(Request $request): array { return $this->registerData['attributes'] ?? []; }