This patch moves $field and $instance structs to CMI / ConfigEntities.
--> Sample CMI files :
Deleted fields & instances get out of the config folder, and are stored in state() until their data gets purged
(i.e. field deletion is deployed like everything else, by the fact that the file is not there anymore)
Patch comes with an update function, and test coverage for basic import operations.
In order to keep the patch size "reasonable", it includes a BC layer that keeps the existing APIs and structures working;
- keeps the old array syntax ($field['cardinality'], $instance['field_name']) fully working through ArrayAccess
- keeps the old field_CRUD_(field|instance)() functions working, on top of the new ConfigEntity way, that also fully works:
'field_name' => 'field_foo',
'entity_type' => 'node',
'bundle' => 'article',
'required' => TRUE,
$instance->label = 'Some label';
There's a basic dump available to also test the upgrade path: http://dl.dropbox.com/u/15116672/d7-fields-cmi-upgrade-test.zip
The following issues have been identified as blockers or problems that need to be solved:
- (to handle field renames)
Fields and instances now have an uuid which is a string. However, the file_managed table id column is an int. This breaks for default imagesFixed in the patch by changing the file_managed.id column to a varchar
Related configuration issues
PASSED: [[SimpleTest]]: [MySQL] 54,305 pass(es).
PASSED: [[SimpleTest]]: [MySQL] 54,279 pass(es).
PASSED: [[SimpleTest]]: [MySQL] 54,428 pass(es).