- Issue created by @mxr576
- πΊπΈUnited States bradjones1 Digital Nomad Life
For the dense among us, ISP is https://en.wikipedia.org/wiki/Interface_segregation_principle
(This is a follow-up on a previous Slack conversation.)
Resource field enhancers are valuable additions by this module to JSONAPI, however, the Drupal\jsonapi_extras\Plugin\ResourceFieldEnhancerInterface
interface is too big, and it requires too much responsibility from implementations. It depends on smaller interfaces/contracts, so it should be easy to explode and create dedicated plugin interfaces and managers for only transforming or untransforming (or both like now).
The PHP library behind the scenes β already has ISP implemented and it allows to perform one-way transformations (like only manipulating the input) instead of building data adaptors always (which has its own challenges, see π± Refactor field enhancer schema generation Active ).
Introduce dedicated plugins and plugin managers for manipulating input and output data (or both).
New APIs are gonna be introduced, the existing one probably gets deprecated.
Active
3.0
Code
For the dense among us, ISP is https://en.wikipedia.org/wiki/Interface_segregation_principle