我正在创建一个composer程序包,但是我的库使用的是“ .class.php”扩展名,而不是通常的“ .php”扩展名。
例如, BaseController.class.php
对于BaseController
类
因此,Composer Autoloader无法找到我的文件。
我该如何解决?
经过大量研究,有两种方法可以做到这一点。不幸的是,这两者都不够好,但是现在任何遇到此问题的人都可以使用它:
.php
为.class.php
$file = $this->findFileWithExtension($class, '.php'); //line 303 $file = $this->findFileWithExtension($class, '.class.php'); //line 303
希望将来的版本会对此提供支持!
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句