/** * 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']); }