Skip to content
Extraits de code Groupes Projets
Valider dc48c313 rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Fix php-versions option handling in generate:travis-yml command.

parent fe2fb11a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -37,7 +37,7 @@ class GenerateTravisYmlFile extends ConsoleCommand ...@@ -37,7 +37,7 @@ class GenerateTravisYmlFile extends ConsoleCommand
"Github token of a user w/ push access to this repository. Used to auto-commit updates to the " "Github token of a user w/ push access to this repository. Used to auto-commit updates to the "
. ".travis.yml file and checkout dependencies. Will be encrypted in the .travis.yml file.\n\n" . ".travis.yml file and checkout dependencies. Will be encrypted in the .travis.yml file.\n\n"
. "If not supplied, the .travis.yml will fail the build if it needs updating.") . "If not supplied, the .travis.yml will fail the build if it needs updating.")
->addOption('php-versions', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, ->addOption('php-versions', null, InputOption::VALUE_OPTIONAL,
"List of PHP versions to test against, ie, 5.4,5.5,5.6. Defaults to: 5.3.3,5.4,5.5,5.6.") "List of PHP versions to test against, ie, 5.4,5.5,5.6. Defaults to: 5.3.3,5.4,5.5,5.6.")
->addOption('dump', null, InputOption::VALUE_REQUIRED, "Debugging option. Saves the output .travis.yml to the specified file."); ->addOption('dump', null, InputOption::VALUE_REQUIRED, "Debugging option. Saves the output .travis.yml to the specified file.");
} }
...@@ -62,7 +62,9 @@ class GenerateTravisYmlFile extends ConsoleCommand ...@@ -62,7 +62,9 @@ class GenerateTravisYmlFile extends ConsoleCommand
$view->setGenerateYmlCommand($thisConsoleCommand); $view->setGenerateYmlCommand($thisConsoleCommand);
$phpVersions = $input->getOption('php-versions'); $phpVersions = $input->getOption('php-versions');
$view->setPhpVersions($phpVersions); if (!empty($phpVersions)) {
$view->setPhpVersions(explode(',', $phpVersions));
}
if (file_exists($outputYmlPath)) { if (file_exists($outputYmlPath)) {
$output->writeln("<info>Found existing YAML file at $outputYmlPath.</info>"); $output->writeln("<info>Found existing YAML file at $outputYmlPath.</info>");
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter