Skip to content

Commit

Permalink
Rename SyncRecipes on InstallRecipes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhelias committed Oct 15, 2019
1 parent a1cc595 commit 4379697
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Expand Up @@ -21,7 +21,7 @@
use Symfony\Flex\Event\UpdateEvent;
use Symfony\Flex\Lock;

class SyncRecipesCommand extends BaseCommand
class InstallRecipesCommand extends BaseCommand
{
private $flex;
private $rootDir;
Expand All @@ -36,15 +36,20 @@ public function __construct(/* cannot be type-hinted */ $flex, string $rootDir)

protected function configure()
{
$this->setName('symfony:sync-recipes')
->setAliases(['sync-recipes', 'fix-recipes'])
$this->setName('symfony:recipes:install')
->setAliases(['symfony:sync-recipes', 'sync-recipes', 'fix-recipes'])
->setDescription('Installs or reinstalls recipes for already installed packages.')
// TODO : Separate the force option in an update command
->addOption('force', null, InputOption::VALUE_NONE, 'Ignore the "symfony.lock" file and overwrite existing files')
;
}

protected function execute(InputInterface $input, OutputInterface $output): int
{
if (in_array($input->getFirstArgument(), $this->getAliases(), true)) {
trigger_error(sprintf('"%s" is deprecated. Please use `symfony:recipes:install` instead.', $input->getFirstArgument()), E_USER_DEPRECATED);
}

$win = '\\' === \DIRECTORY_SEPARATOR;
$force = $input->getOption('force');

Expand Down
2 changes: 1 addition & 1 deletion src/Flex.php
Expand Up @@ -243,7 +243,7 @@ class_exists(__NAMESPACE__.str_replace('/', '\\', substr($file, \strlen(__DIR__)
$app->add(new Command\UpdateCommand($resolver));
$app->add(new Command\RemoveCommand($resolver));
$app->add(new Command\UnpackCommand($resolver));
$app->add(new Command\SyncRecipesCommand($this, $this->options->get('root-dir')));
$app->add(new Command\InstallRecipesCommand($this, $this->options->get('root-dir')));
$app->add(new Command\GenerateIdCommand($this));
$app->add(new Command\DumpEnvCommand($this->config, $this->options));

Expand Down

0 comments on commit 4379697

Please sign in to comment.