The new minimum PHP version is now 7.3.
Update your andrey-helldar/api-response
dependency to ^6.0
in your composer.json
file.
Changed the order of api_response
function attributes from:
function api_response(
$data = null,
int $status_code = 200,
array $headers = [], // here
array $with = [], // here
bool $use_data = true
)
to:
function api_response(
$data = null,
int $status_code = 200,
array $with = [], // here
array $headers = [], // here
bool $use_data = true
)
The status
method from Helldar\ApiResponse\Services\Response
has been removed.
data
method from Helldar\ApiResponse\Services\Response
added status code attribute:
function data(
$data = null,
int $status_code = 200,
bool $use_data = true
)
This method works only with the Laravel and Lumen frameworks 7.0 and above.
If you use the Laravel or Lumen framework, you can update the extends
in the app\Exceptions\Handler.php
file
to Helldar\ApiResponse\Support\LaravelException
.
If you did not add anything to this file, then delete everything properties and methods.
As a result, a clean file will look like this:
<?php
namespace App\Exceptions;
use Helldar\ApiResponse\Support\LaravelException as ExceptionHandler;
class Handler extends ExceptionHandler
{
//
}
Or you can change this file by adding code to it, similar to ours.