Problem/Motivation
Quoting #2952293: Branch next major: version 2, requiring Drupal core >=8.5:
Move
EntityToJsonApiservice tojsonapi_extrasto consolidate the feature and have more flexibility to evolve that API. This will also have the benefit to remove the only public service from the module, leaving all the PHP API as internal. #2958504: Stop using jsonapi.entity.to_jsonapi service in ResourceTestBase
Quoting @dawehner in #2843147-60: Add JSON:API to core as a stable module.1:
To reduce the API surface of the core module I think it would be fine with moving this to jsonapi_extras. It is not something every decoupled site needs. This way new features can be added more easy
Proposed resolution
Move the EntityToJsonApi service to jsonapi_extras.
Remaining tasks
Do it.
User interface changes
None.
API changes
Smaller PHP API surface.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2982210-5.patch | 12.92 KB | wim leers |
Comments
Comment #2
wim leers#2958504: Stop using jsonapi.entity.to_jsonapi service in ResourceTestBase made this easy peasy :)
Comment #3
wim leersWe already have consensus about this among the module maintainers, core maintainers are asking for this, and patch passes tests locally. I'll be bold here for a moment 🤞
Comment #5
wim leersDarn! So close :D
This is the only change that could possibly cause those failures. Confirmed locally that it fixes the failures.
Comment #7
gabesulliceComment #8
wim leersCreated CR: https://www.drupal.org/node/2983182.
Comment #10
wim leers