Browse Source

Merge pull request #4583 from alcohol/show-warning-for-bad-classmap

fixes #4562
Jordi Boggiano 9 năm trước cách đây
mục cha
commit
649dc78f08
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/Composer/Autoload/AutoloadGenerator.php

+ 5 - 1
src/Composer/Autoload/AutoloadGenerator.php

@@ -402,7 +402,11 @@ EOF;
 
         if (isset($autoloads['classmap'])) {
             foreach ($autoloads['classmap'] as $dir) {
-                $loader->addClassMap($this->generateClassMap($dir));
+                try {
+                    $loader->addClassMap($this->generateClassMap($dir));
+                } catch (\RuntimeException $e) {
+                    $this->io->writeError('<warning>'.$e->getMessage().'</warning>');
+                }
             }
         }