From 1ab25bc36a24c11739553c0232c36754c6c6aad1 Mon Sep 17 00:00:00 2001 From: Frederik Bosch Date: Thu, 21 Sep 2017 01:58:56 +0200 Subject: [PATCH] catch not ready to migrate exceptions --- .travis.yml | 2 -- src/Collection.php | 2 ++ src/NotReadyToMigrateException.php | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 src/NotReadyToMigrateException.php diff --git a/.travis.yml b/.travis.yml index 9b3ebd0..3ef166e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: php php: - - 5.5 - 5.6 - - hhvm - 7 script: - phpunit -c tests/phpunit.xml --coverage-clover=coverage.clover diff --git a/src/Collection.php b/src/Collection.php index ae76f64..a8e3451 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -103,6 +103,8 @@ public function migrate($direction = MigrationInterface::DIRECTION_UP) $result->attach($item); } catch (AlreadyMigratedException $e) { /** we will not execute migrations that are already executed */ + } catch (NotReadyToMigrateException $e) { + /** we will not execute migrations that are not ready to be executed */ } } diff --git a/src/NotReadyToMigrateException.php b/src/NotReadyToMigrateException.php new file mode 100644 index 0000000..b8d17fc --- /dev/null +++ b/src/NotReadyToMigrateException.php @@ -0,0 +1,12 @@ +