问题
When loading files through the composer classmap functionality is it possible to load PHP files that have non-standard extensions such as myFileName.stub
or myFileName.foo
?
At present it seems not to be loading them.
回答1:
Composer will currently include files with the following extensions:
.php .inc .hh
The last one is for HHVM stuff.
Relevant lines from the class map generator here:
https://github.com/composer/composer/blob/master/src/Composer/Autoload/ClassMapGenerator.php#L62 https://github.com/composer/composer/blob/master/src/Composer/Autoload/ClassMapGenerator.php#L76
So, looks like you'll need a custom map generator...
来源:https://stackoverflow.com/questions/27912041/composer-classmap-and-loading-files-with-non-standard-extensions