flugg / laravel-responder

A Laravel Fractal package for building API responses, giving you the power of Fractal with Laravel's elegancy.
MIT License
862 stars 86 forks source link

ConvertToSnakeCase - Make compatible with Illuminate TransformsRequest #140

Open dshannon-ifs opened 5 years ago

dshannon-ifs commented 5 years ago

Hello,

Use of ConvertToSnakeCase (laravel 5.8) throws an error "Declaration of Flugg\Responder\Http\Middleware\ConvertToSnakeCase::cleanArray(array $data) should be compatible with Illuminate\Foundation\Http\Middleware\TransformsRequest::cleanArray(array $data, $keyPrefix = '')".

To resolve method should be declared:

protected function cleanArray(array $data, $keyPrefix = '')

flugg commented 5 years ago

Oh, thanks for letting me know. Seems like there was a breaking change with the signature at some point. I'll look into it.