Skip to content

Commit be82c16

Browse files
committed
Remove deprecated Symfony requirement
1 parent 835832c commit be82c16

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"illuminate/support": "^5.5",
99
"illuminate/console": "^5.5",
1010
"illuminate/filesystem": "^5.5",
11-
"symfony/class-loader": "~3.3",
1211
"doctrine/dbal": "~2.3"
1312
},
1413
"autoload": {

src/Console/GenerateCommand.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Illuminate\Database\Eloquent\Relations\Relation;
77
use Illuminate\Filesystem\Filesystem;
88
use Illuminate\Support\Str;
9-
use Symfony\Component\ClassLoader\ClassMapGenerator;
109
use Symfony\Component\Console\Input\InputArgument;
1110
use Symfony\Component\Console\Input\InputOption;
1211
use Symfony\Component\Console\Output\OutputInterface;
@@ -197,7 +196,13 @@ protected function loadModels($models = [])
197196
return [];
198197
}
199198

200-
return array_keys(ClassMapGenerator::createMap($dir));
199+
return array_map(function (\SplFIleInfo $file) {
200+
return str_replace(
201+
[DIRECTORY_SEPARATOR, basename($this->laravel->path()) . '\\'],
202+
['\\', $this->laravel->getNamespace()],
203+
$file->getPath() . DIRECTORY_SEPARATOR . basename($file->getFilename(), '.php')
204+
);
205+
}, $this->files->allFiles($this->dir));
201206
}
202207

203208
/**

0 commit comments

Comments
 (0)