2014-02-21 39 views
2

我知道,好像作曲家或特拉維斯不工作,我不這樣做的工作很好,我不明白autoload如何在本地運行,但不是在特拉維斯建立。 如果有人能夠解釋我遇到的這個問題,我將非常感激。作曲家自動加載不適用於在特拉維斯CI測試

具體顯示的問題時,作爲錯誤彈出,當你沒有看到「命名空間\命名空間\接口」,我認爲這應該是自動加載的,不應該是你不能找到一個接口... 加載非常好,在Travis中進行測試。

這裏是:

PHP Fatal error: Interface 'RestGalleries\Interfaces\User' not found in /home/travis/build/estebanmatias92/RestGalleries/src/RestGalleries/APIs/Flickr/FlickrUser.php on line 15 
PHP Stack trace: 
PHP 1. {main}() /home/travis/.phpenv/versions/5.4.25/bin/phpunit:0 
PHP 2. PHPUnit_TextUI_Command::main() /home/travis/.phpenv/versions/5.4.25/bin/phpunit:46 
PHP 3. PHPUnit_TextUI_Command->run() /home/travis/.phpenv/versions/5.4.25/share/pyrus/.pear/php/PHPUnit/TextUI/Command.php:129 
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /home/travis/.phpenv/versions/5.4.25/share/pyrus/.pear/php/PHPUnit/TextUI/Command.php:176 
PHP 5. PHPUnit_Framework_TestSuite->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:349 
PHP 6. PHPUnit_Framework_TestSuite->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:705 
PHP 7. PHPUnit_Framework_TestSuite->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:705 
PHP 8. PHPUnit_Framework_TestSuite->runTest() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:745 
PHP 9. PHPUnit_Framework_TestCase->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:775 
PHP 10. PHPUnit_Framework_TestResult->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:783 
PHP 11. PHPUnit_Framework_TestCase->runBare() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php:648 
PHP 12. PHPUnit_Framework_TestCase->runTest() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:838 
PHP 13. ReflectionMethod->invokeArgs() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:983 
PHP 14. RestGalleriesTest->testFindUserReturnApiUserObject() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:983 
PHP 15. Composer\Autoload\ClassLoader->loadClass() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:0 
PHP 16. Composer\Autoload\includeFile() /home/travis/build/estebanmatias92/RestGalleries/vendor/composer/ClassLoader.php:269 
PHP 17. include() /home/travis/build/estebanmatias92/RestGalleries/vendor/composer/ClassLoader.php:363 

坦白說,我不認爲它可以是現在。我把我的代碼留在github和失敗的構建(直到那時,我已經失敗了,但留下最後的構建看到)。

Github上:https://github.com/estebanmatias92/RestGalleries

特拉維斯CI構建:https://travis-ci.org/estebanmatias92/RestGalleries/jobs/19337261

回答

6

是您正在使用的OSX的默認情況下具有不區分大小寫的文件系統?嘗試將文件夾interfaces重命名爲Interfaces

+0

按照你的建議,我嘗試了倒退,我改變了接口的接口和它的工作(當然,我也改變了命名空間)。非常感謝你。 – estebanmatias92