dkan
dkan copied to clipboard
Rename resource class
This PR:
- Renames the
Resource
class in DKAN common toDataResource
. - Brings the entire datastore library into DKAN core and renames its
Resource
class toDatastoreResource
This addresses two issues:
- That resource is considered a reserved word now in PHP and classes should not have that name anymore.
- That having a separate "datastore" library, which seemed useful early in the DKAN 2 dev cycle, has turned out to be a burden with few benefits.
There are issues of unnecessary complexity that bringing the datastore library inside DKAN does not solve, but at least it simplifies the codebase and dependency issues. Later we should simplify more of the import and storage code.
The refactoring got a bit out of control and I ended up also removing the SqlStorageTrait (only used by one class) and the StorageInterface (at the moment, redundant with DatabaseTableInterface).
One problem: There is a unit test that moved in from the datastore library, which tests the ImportJob class, which is very slow. Need to find a way to speed this up or replace.