From 6a0e02db1bc6cd402a3054f3b22381ae6c210f58 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 23 May 2020 21:22:07 +0200 Subject: [PATCH] Autoload-Generator: support glob patterns in classmaps --- src/Composer/Autoload/ClassMapGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Autoload/ClassMapGenerator.php b/src/Composer/Autoload/ClassMapGenerator.php index f242a0594..b86a4e9ce 100644 --- a/src/Composer/Autoload/ClassMapGenerator.php +++ b/src/Composer/Autoload/ClassMapGenerator.php @@ -65,7 +65,7 @@ class ClassMapGenerator if (is_string($path)) { if (is_file($path)) { $path = array(new \SplFileInfo($path)); - } elseif (is_dir($path)) { + } elseif (is_dir($path) || strpos($path, '*') !== false) { $path = Finder::create()->files()->followLinks()->name('/\.(php|inc|hh)$/')->in($path); } else { throw new \RuntimeException(