Composer classmap and loading files with non-standard extensions

别说谁变了你拦得住时间么 提交于 2019-12-02 05:40:35

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!