Skip to content

Commit

Permalink
skip invalid paths
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Sep 17, 2024
1 parent ca93716 commit 8a80826
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/auradi
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,21 @@ if ($command === 'scan') {
foreach ($installedJson['packages'] as $package) {
foreach (($package['extra']['aura/di']['classmap-paths'] ?? []) as $classMapPath) {
$fullPath = realpath(dirname($installedJsonFile) . '/' . $package['install-path'] . '/' . $classMapPath);
if ($fullPath === false) {
continue;
}

$classMapPaths[] = $fullPath;
echo '- ' . $fullPath . PHP_EOL;
}
}

foreach (($composerJson['extra']['aura/di']['classmap-paths'] ?? []) as $classMapPath) {
$fullPath = realpath(dirname($composerJsonFile) . '/' . $classMapPath);
if ($fullPath === false) {
continue;
}

$classMapPaths[] = $fullPath;
echo '- ' . $fullPath . PHP_EOL;
}
Expand Down

0 comments on commit 8a80826

Please sign in to comment.