Ejemplo n.º 1
0
 /**
  * Formats and prints a pending version with the given style.
  *
  * @param Version $version The Version to print.
  * @param string $style One of the STYLE_* constants.
  */
 protected function printPendingVersion(Version $version, $style)
 {
     /** @var Version $version */
     $id = $version->getId();
     $reflectionClass = new \ReflectionClass($version->getMigration());
     $absolutePath = $reflectionClass->getFileName();
     $fileName = $absolutePath ? $this->getRelativePath(getcwd(), $absolutePath) : '';
     $this->output->writeln("\t<{$style}>[{$id}] {$fileName}</{$style}>");
 }
 /**
  * findMigrationByVersion
  *
  * @param Version $version
  *
  * @return false|Migration
  */
 protected function findMigrationByVersion(Version $version)
 {
     return Migration::getById($version->getId());
 }