diff --git a/src/Illuminate/Database/Events/NoMigrations.php b/src/Illuminate/Database/Events/NoPendingMigrations.php similarity index 93% rename from src/Illuminate/Database/Events/NoMigrations.php rename to src/Illuminate/Database/Events/NoPendingMigrations.php index f6d3831fbacf..100f78667080 100644 --- a/src/Illuminate/Database/Events/NoMigrations.php +++ b/src/Illuminate/Database/Events/NoPendingMigrations.php @@ -2,7 +2,7 @@ namespace Illuminate\Database\Events; -class NoMigrations +class NoPendingMigrations { /** * The migration method that was called. diff --git a/src/Illuminate/Database/Migrations/Migrator.php b/src/Illuminate/Database/Migrations/Migrator.php index 9e6f0c314bc2..733c08d25297 100755 --- a/src/Illuminate/Database/Migrations/Migrator.php +++ b/src/Illuminate/Database/Migrations/Migrator.php @@ -9,7 +9,7 @@ use Illuminate\Database\Events\MigrationsEnded; use Illuminate\Database\Events\MigrationsStarted; use Illuminate\Database\Events\MigrationStarted; -use Illuminate\Database\Events\NoMigrations; +use Illuminate\Database\Events\NoPendingMigrations; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Arr; use Illuminate\Support\Collection; @@ -140,7 +140,7 @@ public function runPending(array $migrations, array $options = []) // aren't, we will just make a note of it to the developer so they're aware // that all of the migrations have been run against this database system. if (count($migrations) === 0) { - $this->fireMigrationEvent(new NoMigrations('up')); + $this->fireMigrationEvent(new NoPendingMigrations('up')); $this->note('Nothing to migrate.'); @@ -224,7 +224,7 @@ public function rollback($paths = [], array $options = []) $migrations = $this->getMigrationsForRollback($options); if (count($migrations) === 0) { - $this->fireMigrationEvent(new NoMigrations('down')); + $this->fireMigrationEvent(new NoPendingMigrations('down')); $this->note('Nothing to rollback.'); diff --git a/tests/Integration/Database/MigratorEventsTest.php b/tests/Integration/Database/MigratorEventsTest.php index 7a20f9d8af92..75d3ac6327da 100644 --- a/tests/Integration/Database/MigratorEventsTest.php +++ b/tests/Integration/Database/MigratorEventsTest.php @@ -6,7 +6,7 @@ use Illuminate\Database\Events\MigrationsEnded; use Illuminate\Database\Events\MigrationsStarted; use Illuminate\Database\Events\MigrationStarted; -use Illuminate\Database\Events\NoMigrations; +use Illuminate\Database\Events\NoPendingMigrations; use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Event; @@ -61,10 +61,10 @@ public function testTheNoMigrationEventIsFiredWhenNothingToMigrate() $this->artisan('migrate'); $this->artisan('migrate:rollback'); - Event::assertDispatched(NoMigrations::class, function ($event) { + Event::assertDispatched(NoPendingMigrations::class, function ($event) { return $event->method == 'up'; }); - Event::assertDispatched(NoMigrations::class, function ($event) { + Event::assertDispatched(NoPendingMigrations::class, function ($event) { return $event->method == 'down'; }); }