The DatabaseBlock class has lots of static methods that perform factory functions, which should be moved to a new DatabaseBlockFactory service.
This includes the public methods:
- DatabaseBlock::newfromID
- DatabaseBlock::newfromRow
- DatabaseBlock::newfromTarget
- DatabaseBlock::newfromListFromTarget
...and their associated private/protected methods.
This and the new block store service (T221075) should make it easier to write unit tests for classes that use blocking.