Core and composer updates

This commit is contained in:
Rob Davies 2017-07-03 16:47:07 +01:00
parent a82634bb98
commit 62cac30480
1118 changed files with 21770 additions and 6306 deletions

View file

@ -0,0 +1,12 @@
migrate_drupal_ui.upgrade:
title: 'Upgrade'
parent: system.admin_config_development
description: 'Upgrade content and configuration from either a Drupal 6 or a Drupal 7 site.'
route_name: migrate_drupal_ui.upgrade
migrate_drupal_ui.log:
title: 'Upgrade log'
parent: system.admin_reports
description: 'View the upgrade log.'
route_name: migrate_drupal_ui.log
weight: 0

View file

@ -9,7 +9,7 @@ migrate_drupal_ui.upgrade:
_admin_route: TRUE
migrate_drupal_ui.log:
path: '/upgrade/log'
path: '/admin/reports/upgrade'
defaults:
_controller: '\Drupal\migrate_drupal_ui\Controller\MigrateController::showLog'
requirements:

View file

@ -70,6 +70,14 @@ class MigrateUpgradeForm extends ConfirmFormBase {
'source_module' => 'block',
'destination_module' => 'block',
],
'block_content_entity_form_display' => [
'source_module' => 'block',
'destination_module' => 'block_content',
],
'block_content_entity_display' => [
'source_module' => 'block',
'destination_module' => 'block_content',
],
'block_content_body_field' => [
'source_module' => 'block',
'destination_module' => 'block_content',
@ -426,7 +434,7 @@ class MigrateUpgradeForm extends ConfirmFormBase {
'source_module' => 'simpletest',
'destination_module' => 'simpletest',
],
'd6_statistics_settings' => [
'statistics_settings' => [
'source_module' => 'statistics',
'destination_module' => 'statistics',
],
@ -582,6 +590,10 @@ class MigrateUpgradeForm extends ConfirmFormBase {
'source_module' => 'profile',
'destination_module' => 'user',
],
'd7_theme_settings' => [
'source_module' => 'system',
'destination_module' => 'system',
],
'd6_user' => [
'source_module' => 'user',
'destination_module' => 'user',
@ -791,6 +803,9 @@ class MigrateUpgradeForm extends ConfirmFormBase {
$info[] = $this->t('Make sure that the host this site is on has access to the database for your previous site.');
$info[] = $this->t('If your previous site has private files to be migrated, a copy of your files directory must be accessible on the host this site is on.');
$info[] = $this->t('In general, enable all modules on this site that are enabled on the previous site. For example, if you have used the book module on the previous site then you must enable the book module on this site for that data to be available on this site.');
$info[] = $this->t('Do not add any information on this site (including but not limited to user accounts, taxonomy terms, and node content) before upgrading. Any pre-existing information on the site risks being overwritten by the upgrade process. See <a href=":url">the upgrade preparation guide</a> for more information.', [
':url' => 'https://www.drupal.org/docs/8/upgrade/preparing-an-upgrade#dont_create_content',
]);
$info[] = $this->t('Put this site into <a href=":url">maintenance mode</a>.', [
':url' => Url::fromRoute('system.site_maintenance_mode')->toString(TRUE)->getGeneratedUrl(),
]);

View file

@ -30,7 +30,16 @@ abstract class MigrateUpgradeTestBase extends WebTestBase {
*
* @var array
*/
public static $modules = ['language', 'content_translation', 'migrate_drupal_ui', 'telephone'];
public static $modules = [
'language',
'content_translation',
'migrate_drupal_ui',
'telephone',
'aggregator',
'book',
'forum',
'statistics',
];
/**
* {@inheritdoc}
@ -143,8 +152,9 @@ abstract class MigrateUpgradeTestBase extends WebTestBase {
$this->resetAll();
$expected_counts = $this->getEntityCounts();
foreach (array_keys(\Drupal::entityTypeManager()->getDefinitions()) as $entity_type) {
$real_count = count(\Drupal::entityTypeManager()->getStorage($entity_type)->loadMultiple());
foreach (array_keys(\Drupal::entityTypeManager()
->getDefinitions()) as $entity_type) {
$real_count = \Drupal::entityQuery($entity_type)->count()->execute();
$expected_count = isset($expected_counts[$entity_type]) ? $expected_counts[$entity_type] : 0;
$this->assertEqual($expected_count, $real_count, "Found $real_count $entity_type entities, expected $expected_count.");
}

View file

@ -34,42 +34,44 @@ class MigrateUpgrade6Test extends MigrateUpgradeTestBase {
*/
protected function getEntityCounts() {
return [
'block' => 30,
'aggregator_item' => 1,
'aggregator_feed' => 1,
'block' => 35,
'block_content' => 2,
'block_content_type' => 1,
'comment' => 3,
'comment_type' => 2,
'comment_type' => 3,
'contact_form' => 5,
'configurable_language' => 5,
'editor' => 2,
'field_config' => 63,
'field_storage_config' => 43,
'field_config' => 73,
'field_storage_config' => 48,
'file' => 7,
'filter_format' => 7,
'image_style' => 5,
'language_content_settings' => 2,
'migration' => 105,
'node' => 11,
'node_type' => 11,
'rdf_mapping' => 5,
'node' => 16,
'node_type' => 13,
'rdf_mapping' => 7,
'search_page' => 2,
'shortcut' => 2,
'shortcut_set' => 1,
'action' => 22,
'menu' => 8,
'taxonomy_term' => 6,
'taxonomy_vocabulary' => 5,
'taxonomy_vocabulary' => 6,
'tour' => 4,
'user' => 7,
'user_role' => 6,
'menu_link_content' => 4,
'view' => 12,
'view' => 14,
'date_format' => 11,
'entity_form_display' => 15,
'entity_form_display' => 19,
'entity_form_mode' => 1,
'entity_view_display' => 32,
'entity_view_mode' => 12,
'base_field_override' => 33,
'entity_view_display' => 43,
'entity_view_mode' => 14,
'base_field_override' => 38,
];
}

View file

@ -34,17 +34,19 @@ class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
*/
protected function getEntityCounts() {
return [
'aggregator_item' => 10,
'aggregator_feed' => 1,
'block' => 25,
'block_content' => 1,
'block_content_type' => 1,
'comment' => 1,
'comment_type' => 7,
'comment_type' => 8,
// Module 'language' comes with 'en', 'und', 'zxx'. Migration adds 'is'.
'configurable_language' => 4,
'contact_form' => 3,
'editor' => 2,
'field_config' => 49,
'field_storage_config' => 37,
'field_config' => 52,
'field_storage_config' => 39,
'file' => 2,
'filter_format' => 7,
'image_style' => 6,
@ -52,25 +54,25 @@ class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
'migration' => 73,
'node' => 3,
'node_type' => 6,
'rdf_mapping' => 5,
'rdf_mapping' => 7,
'search_page' => 2,
'shortcut' => 6,
'shortcut_set' => 2,
'action' => 16,
'menu' => 6,
'taxonomy_term' => 18,
'taxonomy_vocabulary' => 3,
'taxonomy_vocabulary' => 4,
'tour' => 4,
'user' => 4,
'user_role' => 3,
'menu_link_content' => 7,
'view' => 12,
'view' => 14,
'date_format' => 11,
'entity_form_display' => 16,
'entity_form_display' => 18,
'entity_form_mode' => 1,
'entity_view_display' => 24,
'entity_view_mode' => 11,
'base_field_override' => 7,
'entity_view_display' => 29,
'entity_view_mode' => 14,
'base_field_override' => 9,
];
}