2013-08-20 19 views
0

我有使用Symfony2.3Symfony2的供應商,並承諾復位混帳

當我開始我的項目,我加入的廠商到我的git倉庫,現在我想刪除我的供應商的問題。

所以我做的:

git rm --cached -r vendor/ 

該命令從混帳回購協議中刪除我的所有的供應商,但我有問題,所以我做了git的復位,讓我的供應商了。

現在我有一個問題,我真的不知道爲什麼,當I'l嘗試通過應用程序/控制檯運行命令行,我得到這個錯誤信息:

[RuntimeException]                                                                                    
    The autoloader expected class "FOS\JsRoutingBundle\Command\Command\DumpCommand" to be  defined in file  "/Users/ant/Documents/projects/test/application/vendor/friendsofsymfony/jsrouting- bundle/FOS/JsRoutingBundle/Command/Command/DumpCommand.php". The file was found but the class  was not in it, the class name or namespace probably has a typo. 

所以我tryed刪除jsrouting從我composer.json -bundle但是當我運行

composer.phar update 

jsrouting束不會被刪除

所以我在第一時間喜歡手動刪除jsrouting束重新下載它。

,沒有問題請從我的混帳回購協議的廠商

感謝您的幫助

編輯:

我解決了第一部分:

我去verdor>作曲家> autoload_namespace .php和我刪除此行:

'FOS\\JsRoutingBundle' => array($vendorDir . '/friendsofsymfony/jsrouting-bundle'), 

我還從供應商文件夾 和作曲家重新安裝JsRoutingBundle中刪除了JsRoutingBundle。

但我想有一個尖,除去我的供應商文件夾正確

回答

1

如果您正在使用的作曲家,供應商文件夾應該只包含作曲家安裝數據。從磁盤和git中完全刪除文件夾,刪除composer.lock,然後使用composer.json重新安裝所有文件。

composer.phar install 

您可能必須刪除每個主機上每個副本上的供應商文件夾和composer.lock文件。

+0

感謝您的幫助 – Ajouve