Closed fr0gs closed 6 years ago
I think I found the error.
protected function buildMapping($mappedClass)
{
return (\is_string($mappedClass) && \class_exists($mappedClass, true)) ?
MappingFactory::fromClass($mappedClass) :
MappingFactory::fromArray($mappedClass);
}
Which means that if you don't realize the class does not exist (was not properly imported) the function thinks it is an array. Would it be possible to throw a different error instead maybe to enhance debugging?
I am constantly getting for this code:
This error message:
I have tried passing
And other example values with no result. It seems to internally unbox the first one all the time.
I am using laravel 5.2 and using php-json-api 2.6.0.