User tests: Successful: Unsuccessful:
Pull Request for Issue #37305 .
When creating a new JSONApiView object, but not handing over the optional parameter 'contentType', the following line with the JoomlaSerializer throws an error.
Codereview
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
The intention here was type is a required parameter. Either via injecting through content type or setting it directly in the class depending on the use case. We might be better off throwing a legit 500 to symbolize that though, the serializer is required for both displayList and displayItem - so don't think this is the fix.
In this case we should do it the same as all other object we need.
So we need a SerializerAwareInterface requres a setSerializer function and SerializerAwareTrait this implements with a private variable and a getter function.
Similar to CurrentUserInterface
This pull request has been automatically rebased to 5.2-dev.
Title |
|
I have tested this item ✅ successfully on 9c3c54e
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43179.