mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
allow model_locations to have glob patterns (#1059)
* allow model_locations to have glob patterns This if statement check for a valid directory was happening to early. It was checking the string that contained the wildcards to see if it is a valid directory and always failing. Need to check after the foreach starts. fixes #1058 . * test(#1059) Allow glob directories * Fix tests to chdir() into where to expect the glob to work * Update CHANGELOG.md Co-authored-by: Markus Podar <[email protected]>
This commit is contained in:
co-authored by
Markus Podar
parent
fd4d280a80
commit
1044f466e9
@@ -305,13 +305,14 @@ class ModelsCommand extends Command
|
||||
$dir = base_path($dir);
|
||||
}
|
||||
|
||||
if (!is_dir($dir)) {
|
||||
$this->error("Cannot locate directory '{'$dir}'");
|
||||
continue;
|
||||
}
|
||||
|
||||
$dirs = glob($dir, GLOB_ONLYDIR);
|
||||
foreach ($dirs as $dir) {
|
||||
|
||||
if (!is_dir($dir)) {
|
||||
$this->error("Cannot locate directory '{'$dir}'");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file_exists($dir)) {
|
||||
$classMap = ClassMapGenerator::createMap($dir);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user