Skip to content

Commit 30ef240

Browse files
committed
Fix Laravel 8 compat
1 parent 00a6308 commit 30ef240

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Migrations/Migrator.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ class Migrator extends LaravelMigrator
2929
{
3030
public function __construct(MigrationRepositoryInterface $repository, Resolver $resolver)
3131
{
32-
parent::__construct($repository, $resolver, new Filesystem());
32+
if (class_exists(Filesystem::class)) {
33+
parent::__construct($repository, $resolver, new Filesystem());
34+
} else {
35+
// compat with Laravel 8
36+
$this->repository = $repository;
37+
$this->resolver = $resolver;
38+
}
3339
}
3440

3541
public function getMigrationFiles($paths): array

0 commit comments

Comments
 (0)