ConfigStorageController allows a new entity to override an existing entity.
This can cause problems with modules, for example, if two installed modules provide the same default configuration, one of the configuration entities will be silently overwritten. The most immediate effect of making this change, is that various tests have had to be modified to accomodate this desired behavior:
BreakpointThemeTest, ConfigEntityTest, ConfigImportTest, ViewStorageTest, FieldTypeTest
ConfigStorageController will not allow saving a "new" entity that overrides an existing entity. A developer would need to test whether or not that ID exists before performing an entity_create()->save(). If they don't an error message should be returned with an entity ID.
Work has been done to make sure that these calls were being correctly tested. A series of patches had failed to pass tests.
Patch conflicts with ModuleApiTest::testDependencyResolution() #1776830: Installation and uninstallation of configuration provided by a module that belongs to another module's API
To override attributes of an entity, a developer should use
$entity = entity_load('foo', 'foo')); $entity->set('label', 'bar'); $entity->save();
Original report by tim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 59,516 pass(es). View
FAILED: [[SimpleTest]]: [MySQL] 59,522 pass(es), 2 fail(s), and 3 exception(s). View
FAILED: [[SimpleTest]]: [MySQL] 58,904 pass(es), 52 fail(s), and 8 exception(s). View
FAILED: [[SimpleTest]]: [MySQL] 59,125 pass(es), 8 fail(s), and 9 exception(s). View