Problem/Motivation
The migration UI re-uses the installation database form to gather db credentials from the user. This works great apart from the fact that we do:
$db_prefix = ($profile == 'standard') ? 'drupal_' : $profile . '_';
$form['advanced_options']['prefix'] = [
'#type' => 'textfield',
'#title' => t('Table name prefix'),
'#default_value' => empty($database['prefix']) ? '' : $database['prefix'],
'#size' => 45,
'#description' => t('If more than one application will be sharing this database, a unique table name prefix – such as %prefix – will prevent collisions.', ['%prefix' => $db_prefix]),
'#weight' => 10,
];
The description makes no sense in the migrate case (it does during installation).
This was found in #3086374: Make Drupal 8 & 9 compatible with PHP 7.4 due to the global $install_state not being set and new errors being emitted from PHP. Running Drupal\Tests\migrate_drupal_ui\Functional\d6\MultilingualReviewPageTest
showed the error.
Proposed resolution
We should change the description for this form field in \Drupal\migrate_drupal_ui\Form\CredentialForm::buildForm() and perhaps rework the logic in \Drupal\Core\Database\Install\Tasks::getFormOptions so we don't set a nonsense one for migrate in the first place.
Remaining tasks
User interface changes
New UI text on migrate credentials form.
API changes
None
Data model changes
None