-
Notifications
You must be signed in to change notification settings - Fork 21
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
League Fractal dependency issue after update #41
Comments
@AbhijeetSomwanshi there is an opened issue in thephpleague/fractal#374, but may i get a repro/sample code ? maybe i can get around it in this package scope |
This is my Controller code where I am getting this error,
And my transformer code,
|
@AbhijeetSomwanshi i cant repro that error with your code sample, but i guess you have something similar to this in your transfomer class public function includeXYZ($resource){
// return something which is not an array
return $resource->id;
} the alternative is to use league/fractal 0.17.0 feature public function includeXYZ($resource){
return $this->primitive($resource->id);
} i will tag a new release soon. |
Getting an error after upgrading:
Type error: Argument 1 passed to League\Fractal\Scope::filterFieldsets() must be of the type array, integer given, called in /vendor/league/fractal/src/Scope.php on line 385
The text was updated successfully, but these errors were encountered: