public function MigrateUpgradeCommands::validatePassword in Migrate Upgrade 8.3
Validation callback for password.
@hook validate migrate:upgrade
File
- src/
Commands/ MigrateUpgradeCommands.php, line 100
Class
- MigrateUpgradeCommands
- Migrate Upgrade drush commands.
Namespace
Drupal\migrate_upgrade\CommandsCode
public function validatePassword(CommandData $commandData) {
$input = $commandData
->input();
$db_url = $input
->getOption('legacy-db-url');
$db_key = $input
->getOption('legacy-db-key');
if (!$db_url && !$db_key) {
throw new \Exception('You must provide either a --legacy-db-url or --legacy-db-key.');
}
}