MigrationPlanCalculator.php 705 B

123456789101112131415161718192021222324252627
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Migrations\Version;
  4. use Doctrine\Migrations\Metadata\AvailableMigrationsList;
  5. use Doctrine\Migrations\Metadata\MigrationPlanList;
  6. /**
  7. * The MigrationPlanCalculator is responsible for calculating the plan for migrating from the current
  8. * version to another version.
  9. */
  10. interface MigrationPlanCalculator
  11. {
  12. /**
  13. * @param Version[] $versions
  14. */
  15. public function getPlanForVersions(array $versions, string $direction): MigrationPlanList;
  16. public function getPlanUntilVersion(Version $to): MigrationPlanList;
  17. /**
  18. * Returns a sorted list of migrations.
  19. */
  20. public function getMigrations(): AvailableMigrationsList;
  21. }