Problem/Motivation

vcapi has been using mainly the same building blocks on 6.x-2.x and 7.x-1.x
D8 port sounds like a good place to refactor it and embrace some of the new APIs in core.

Proposed resolution

Explore initial implementations on the d8port topic branch and discuss around which D8 APIs to use in which parts of vcapi.
Notice that d8port topic branch is temporal, IMHO we should wait at least until beta1 to start the 8.x-1.x branch. Also I would like to squash several commits in some groups, for now using "group: detail" to visually identify them.
More TBD

How to approach these objects:

backend

As plugin.

VersioncontrolEntity

interface VersioncontrolEntityInterface extends EntityInterface, ComplexDataInterface {}
abstract class VersioncontrolEntityBase extends Entity implements VersioncontrolEntityInterface {}

Pending

repository, branch, tag, operation, item, event, entity controllers

d7 plugins

event_processor, user_mapping_methods, vcs_auth, views_sets, webviewer_url_handlers

tests

Use phpunit as much as possible using versioncontrol as group.
For the rest, still use simpletest, about that, base port of VersioncontrolTestCase renamed as VersioncontrolTestBase is still in progress.

Remaining tasks

Review "vc-next" issues to see how much we can do in this process.
TBD

User interface changes

NA

API changes

Lots

Original report by @marvil07

Let's use this ticket to plan the D8 port.

I started something on a d8port topic branch, converting backends to be plugins.
Currently:

  • 2e44a58 main info file
  • 3439340 backends as plugins: annotation, manager and service
  • 17ff5b6 backends as plugins: plugin interface and base plugin class
  • b7c55f3 backends as plugins: move capabilities constants to backend interface
  • 5c1eb95 backends as plugins: fake backend class

The only other thing I have been exploring is how to implement our general VersioncontrolEntity, for now I think it should like this(use typed data api and use entities, but do not use ContentEntityInterface as base to avoid entities to be translatable and revisionable):

interface VersioncontrolEntityInterface extends EntityInterface, ComplexDataInterface {}
abstract class VersioncontrolEntityBase extends Entity implements VersioncontrolEntityInterface {}

Comments

marvil07’s picture

Issue summary: View changes

Relevant new commits in d8port:

  • 1b6c679 backends as plugins: start test backend class
  • c51bacb backends as plugins: backends do not need to be complex data objects
  • e2d5433 backends as plugins: implements PluginInspectionInterface on BackendBase

Updated issue summary to reflect the original intention of the issue.

marvil07’s picture

Issue summary: View changes

Some new commits about testing, basic plan is to use phpunit as much as we can, so we have faster and more isolated tests:

  • 76bd090 tests: Incomplete port of VersioncontrolTestCase now renamed as VersioncontrolTestBase
  • fca4e94 tests: Use unit testing, declare a base class.
  • 9bd149a tests: Unit testing for BackendBase class.