Problem/Motivation
The current mock api only abstracts a few parts where we should retrieve data from d.org via the new plugins. Categories and releases are still not using the plugin system, and ideally, we'd want to abstract these too.
The abstraction goes a bit deeper, so things like "taxonomy_vocabulary_3", should be mapped to a more friendly name, and that should happen at plugin level.
In order to start work on the actual d.org endpoints implementation, we need to refactor a few things. Namely:
* New endpoint to retrieve categories (also mentioned here https://www.drupal.org/project/project_browser/issues/3278333)
* New setting to add an endpoint where to connect
* Remove DrupalOrgClient usage as this should be totally replaced by the plugins
* Abstract the plugins from the source adding a few methods, so the plugins can be totally interchangeable (ie: mock vs d.org)
Proposed resolution
I will shortly submit a working PR where some of the above changes have been addressed and the plugins are now interchangeable. Right now the "new" plugin is just a copy of the mock plugin, but by completely separating it, it means that we can start working on the actual d.org integration via jsonapi.
Remaining tasks
If this gets merged, then we can continue working on the d.org plugin as we'd have all the scaffolding files in place and the initial architecture (ie: the following MR) would have been validated.
User interface changes
None.
API changes
None technically other than having the ability to switch plugins.
Data model changes
Will need to eventually rename a few things like "taxonomy_vocabulary_XX" to a friendlier version but not a blocker for this for now.
Release notes snippet
Allow for multiple plugins and bring all the data from those plugins only.
Issue fork project_browser-3278352
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
fjgarlin commentedComment #4
fjgarlin commentedApplied the renaming changes from the related issue to this refactoring.
Comment #5
fjgarlin commentedI needed to rebase a couple of times with issues that were just merged. Commit history might look weird as I needed to force push to my issue fork (based on this info, tho probably there is a better way which I don't know).
Should be good to merge again. Will keep an eye on further merged tickets.
Comment #6
fjgarlin commentedComment #7
tim.plunkettComment #8
tim.plunkettPushed up two nits, and opened #3279510: Reevaluate or remove DrupalOrgClient
Thanks @fjgarlin
Comment #9
chrisfromredfinComment #10
chrisfromredfin