Skip to content

Commit

Permalink
Removes autoload dumping from make migration command
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Feb 21, 2023
1 parent 8dac049 commit 60f8152
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Illuminate\Contracts\Console\PromptsForMissingInput;
use Illuminate\Database\Migrations\MigrationCreator;
use Illuminate\Support\Composer;
use Illuminate\Support\Str;

class MigrateMakeCommand extends BaseCommand implements PromptsForMissingInput
Expand Down Expand Up @@ -35,26 +34,17 @@ class MigrateMakeCommand extends BaseCommand implements PromptsForMissingInput
*/
protected $creator;

/**
* The Composer instance.
*
* @var \Illuminate\Support\Composer
*/
protected $composer;

/**
* Create a new migration install command instance.
*
* @param \Illuminate\Database\Migrations\MigrationCreator $creator
* @param \Illuminate\Support\Composer $composer
* @return void
*/
public function __construct(MigrationCreator $creator, Composer $composer)
public function __construct(MigrationCreator $creator)
{
parent::__construct();

$this->creator = $creator;
$this->composer = $composer;
}

/**
Expand Down Expand Up @@ -93,8 +83,6 @@ public function handle()
// the migration out, we will dump-autoload for the entire framework to
// make sure that the migrations are registered by the class loaders.
$this->writeMigration($name, $table, $create);

$this->composer->dumpAutoloads();
}

/**
Expand All @@ -107,11 +95,11 @@ public function handle()
*/
protected function writeMigration($name, $table, $create)
{
$file = $this->creator->create(
return tap($this->creator->create(
$name, $this->getMigrationPath(), $table, $create
);

$this->components->info(sprintf('Migration [%s] created successfully.', $file));
), function ($file) {
$this->components->info(sprintf('Migration [%s] created successfully.', $file));
});
}

/**
Expand Down

0 comments on commit 60f8152

Please sign in to comment.