Skip to content

Commit

Permalink
Fix Laravel 8 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Jul 29, 2023
1 parent 00a6308 commit 30ef240
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Migrations/Migrator.php
Expand Up @@ -29,7 +29,13 @@ class Migrator extends LaravelMigrator
{
public function __construct(MigrationRepositoryInterface $repository, Resolver $resolver)
{
parent::__construct($repository, $resolver, new Filesystem());
if (class_exists(Filesystem::class)) {
parent::__construct($repository, $resolver, new Filesystem());
} else {
// compat with Laravel 8
$this->repository = $repository;
$this->resolver = $resolver;
}
}

public function getMigrationFiles($paths): array
Expand Down

0 comments on commit 30ef240

Please sign in to comment.