if (!
file_exists($info_file)) { $io->
getErrorStyle()->
error("The theme info file
$info_file could not be read."
);
return 1;
} $info = Yaml::
decode(file_get_contents($info_file));
$info['name'
] =
$input->
getOption('name'
) ?:
$destination_theme;
$info['core_version_requirement'
] = '^' .
$this->
getVersion();
if (!
array_key_exists('version',
$info)) { $confirm_versionless_source_theme =
new ConfirmationQuestion(sprintf('The source theme %s does not have a version specified. This makes tracking changes in the source theme difficult. Are you sure you want to continue?',
$source_theme->
getName()));
if (!
$io->
askQuestion($confirm_versionless_source_theme)) { return 0;
} } $source_version =
$info['version'
] ?? 'unknown-version';
if ($source_version === 'VERSION'
) { $source_version = \Drupal::VERSION;
} // A version in the generator string like "9.4.0-dev" is not very helpful.
// When this occurs, generate a version string that points to a commit.