MigrationNotAvailable.php 502 B

123456789101112131415161718192021222324
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Migrations\Exception;
  4. use Doctrine\Migrations\Version\Version;
  5. use RuntimeException;
  6. use function sprintf;
  7. final class MigrationNotAvailable extends RuntimeException implements MigrationException
  8. {
  9. public static function forVersion(Version $version): self
  10. {
  11. return new self(
  12. sprintf(
  13. 'The migration %s is not available',
  14. (string) $version
  15. ),
  16. 5
  17. );
  18. }
  19. }