The initial code was kept in /lib for convenience, but it probably makes sense to move it into a package. See ADR-14.
Description
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Addshore | T281453 Abstract database connections between Client and Repository | |||
| Stalled | None | T284231 Consider moving the DomainDb abstraction code into a package per ADR-14 |
Event Timeline
I think this might be blocked on MediaWiki’s rdbms library becoming available as a composer package – otherwise, this package won’t be able to stand on its own…
Edit: that would be T158929: Librarize MediaWiki database layer and drop official support for non-MySQL engines.
I agree that this is effectively stalled on that task. And since that task doesn't look like it is something that is going to get done soon, I think we can remove this task from the campsite.
That being said, I think this task can also stand on its own, and so I'm adding it to [DEPRECATED] wdwb-tech in its own right.
I don't think this should be a reason for us to not seperate the code into a well defined package.
I also encountered this when trying out a split of our simple cache code https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/593557
We would just not actually push this code into its own git repository (as nothing else will be reusing it anyway right now).
(time for the slightly controversial bit)
Most things that do require it should probably depend on Wikibase directly, rather than the individual package.
There is some similar discussion around this topic in T258822: Wikibase extensions do not declare extension.json dependency on Wikibase (and some other tasks).