logContains() 공개 정적인 메소드

Checks if the git repository for the given $path has a log entry matching $searchTerm
public static logContains ( string $path, string $searchTerm ) : boolean
$path string
$searchTerm string
리턴 boolean
예제 #1
0
 /**
  * Whether or not the given $migration has been applied to the current package
  *
  * @param AbstractMigration $migration
  * @return boolean
  */
 protected function hasMigrationApplied(AbstractMigration $migration)
 {
     // if the "applied-flow-migrations" section doesn't exist, we fall back to checking the git log for applied migrations for backwards compatibility
     if (!isset($this->currentPackageData['composerManifest']['extra']['applied-flow-migrations'])) {
         return Git::logContains($this->currentPackageData['path'], 'Migration: ' . $migration->getIdentifier());
     }
     return in_array($migration->getIdentifier(), $this->currentPackageData['composerManifest']['extra']['applied-flow-migrations']);
 }