diff --git a/app/Support/DusterConfig.php b/app/Support/DusterConfig.php index 22d0cd0..d039216 100644 --- a/app/Support/DusterConfig.php +++ b/app/Support/DusterConfig.php @@ -10,6 +10,16 @@ class DusterConfig { + /** + * @var array + */ + public static array $phpSuffixes = [ + '.php', + '.php.inc', + '.php.stub', + '.php.skeleton', + ]; + /** * @param array|string> $config */ @@ -78,8 +88,8 @@ public static function globPath(string $path): array // Finder uses forward slashes even on windows $path = Str::of($path)->replace('\\', '/')->__toString(); - if (Str::of($path)->endsWith('.php')) { - $name = Str::of($path)->afterLast('/'); + if (Str::of($path)->endsWith(self::$phpSuffixes)) { + $endsWith = Str::of($path)->afterLast('/'); $path = Str::of($path)->beforeLast('/'); $files = (new Finder) @@ -88,7 +98,7 @@ public static function globPath(string $path): array ->files() ->in($path); } else { - $name = '.php'; + $endsWith = self::$phpSuffixes; $files = (new Finder) ->ignoreUnreadableDirs() ->files() @@ -97,7 +107,7 @@ public static function globPath(string $path): array return collect($files) ->map( - fn ($file) => Str::of($file->getPathName())->endsWith($name) + fn ($file) => Str::of($file->getPathName())->endsWith($endsWith) // Fixes weird windows path issue with mixed slashes ? Str::of($file->getPathName())->replace('\\', '/')->__toString() : null diff --git a/builds/duster b/builds/duster index fbdf0e7..c9b695f 100755 Binary files a/builds/duster and b/builds/duster differ diff --git a/config/app.php b/config/app.php index 94fc234..fcfc43b 100644 --- a/config/app.php +++ b/config/app.php @@ -26,7 +26,7 @@ | */ - 'version' => '2.7.0', + 'version' => '2.7.1', /* |--------------------------------------------------------------------------