diff --git a/core/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php index d8b6eae..b0f1f13 100644 --- a/core/lib/Drupal/Core/Entity/EntityInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityInterface.php @@ -21,7 +21,7 @@ interface EntityInterface { * @param $entity_type * The type of the entity to create. */ - public function __construct(array $values, $entity_type); + public function __construct(array $values = array(), $entity_type); /** * Returns the entity identifier (the entity's machine name or numeric ID). diff --git a/core/modules/config/lib/Drupal/config/ConfigEntityBase.php b/core/modules/config/lib/Drupal/config/ConfigEnti index affaf24..11effae 100644 --- a/core/modules/config/lib/Drupal/config/ConfigEntityBase.php +++ b/core/modules/config/lib/Drupal/config/ConfigEntityBase.php @@ -93,8 +93,10 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface $a_weight = isset($a->weight) ? $a->weight : 0; $b_weight = isset($b->weight) ? $b->weight : 0; if ($a_weight == $b_weight) { - $a_label = $a->label() ?: ''; - $b_label = $b->label() ?: ''; + $a_label = $a->label(); + $a_label = isset($a_label) ? $a_label : ''; + $b_label = $b->label(); + $b_label = isset($b_label) ? $b_label : ''; return strnatcasecmp($a_label, $b_label); } return ($a_weight < $b_weight) ? -1 : 1; diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php b/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php index a5f8b94..7e0c5e9 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php @@ -138,7 +138,7 @@ class DependencyTest extends ModuleTestBase { // - taxonomy depends on options // - poll depends on php (via module_test) // The correct enable order is: - $expected_order = array('comment', 'config', 'options', 'taxonomy', 'php', 'poll', 'forum'); + $expected_order = array('comment', 'options', 'taxonomy', 'php', 'poll', 'forum'); // Enable the modules through the UI, verifying that the dependency chain // is correct. @@ -146,15 +146,14 @@ class DependencyTest extends ModuleTestBase { $edit['modules[Core][forum][enable]'] = 'forum'; $this->drupalPost('admin/modules', $edit, t('Save configuration')); $this->assertModules(array('forum'), FALSE); - $this->assertText(t('You must enable the Taxonomy, Configuration manager, Options, Comment, Poll, PHP Filter modules to install Forum.')); + $this->assertText(t('You must enable the Taxonomy, Options, Comment, Poll, PHP Filter modules to install Forum.')); $edit['modules[Core][options][enable]'] = 'options'; - $edit['modules[Core][config][enable]'] = 'config'; $edit['modules[Core][taxonomy][enable]'] = 'taxonomy'; $edit['modules[Core][comment][enable]'] = 'comment'; $edit['modules[Core][poll][enable]'] = 'poll'; $edit['modules[Core][php][enable]'] = 'php'; $this->drupalPost('admin/modules', $edit, t('Save configuration')); - $this->assertModules(array('forum', 'poll', 'php', 'comment', 'taxonomy', 'config', 'options'), TRUE); + $this->assertModules(array('forum', 'poll', 'php', 'comment', 'taxonomy', 'options'), TRUE); // Check the actual order which is saved by module_test_modules_enabled(). $this->assertIdentical(variable_get('test_module_enable_order', array()), $expected_order); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Vocabulary.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Vocabulary.php index 5f9de33..f3ffcf5 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Vocabulary.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Vocabulary.php @@ -7,7 +7,7 @@ namespace Drupal\taxonomy; -use Drupal\config\ConfigEntityBase; +use Drupal\Core\Config\Entity\ConfigEntityBase; /** * Defines the taxonomy vocabulary entity. diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php index 6b08451..27bf1cc 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php @@ -7,7 +7,7 @@ namespace Drupal\taxonomy; -use Drupal\config\ConfigStorageController; +use Drupal\Core\Config\Entity\ConfigStorageController; use Drupal\Core\Entity\EntityInterface; /** diff --git a/core/modules/taxonomy/taxonomy.info b/core/modules/taxonomy/taxonomy.info index 9b32326..837b556 100644 --- a/core/modules/taxonomy/taxonomy.info +++ b/core/modules/taxonomy/taxonomy.info @@ -3,6 +3,5 @@ description = Enables the categorization of content. package = Core version = VERSION core = 8.x -dependencies[] = config dependencies[] = options configure = admin/structure/taxonomy diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 333e405..d6fed7b 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -1048,7 +1048,7 @@ function taxonomy_vocabulary_load_multiple(array $vids = NULL) { function taxonomy_vocabulary_sort(array &$vocabularies = array()) { // @todo Investigate the cause of Warning: uasort() [function.uasort]: Array // was modified by the user comparison function - @uasort($vocabularies, 'Drupal\config\ConfigEntityBase::sort'); + @uasort($vocabularies, 'Drupal\Core\Config\Entity\ConfigEntityBase::sort'); } /**