DuplicateMigrationVersion.php 507 B

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