/**
  * Handles the "upgrade" command.
  *
  * @param Args $args The console arguments.
  * @param IO   $io   The I/O.
  *
  * @return int The status code.
  */
 public function handle(Args $args, IO $io)
 {
     $packageFile = $this->packageFileManager->getPackageFile();
     $originVersion = $packageFile->getVersion();
     $targetVersion = $args->getArgument('version');
     if (version_compare($originVersion, $targetVersion, '=')) {
         $io->writeLine(sprintf('Your puli.json is already at version %s.', $targetVersion));
         return 0;
     }
     $this->packageFileManager->migrate($targetVersion);
     $io->writeLine(sprintf('Migrated your puli.json from version %s to version %s.', $originVersion, $targetVersion));
     return 0;
 }