我对使用 Symfony2.3 的供应商有疑问
当我开始我的项目时,我将供应商添加到我的 git 存储库中,现在我想删除它。
所以我这样做:
git rm --cached -r vendor/
这个命令从 git repo 中删除了我所有的供应商,但我遇到了问题,所以我做了一个 git reset 来让我的供应商回来。
现在我遇到了一个我不知道为什么的问题,当我尝试通过 app/console 运行命令行时,我收到了以下错误消息:
[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.
所以我试图从我的 composer.json 中删除 jsrouting-bundle 但是当我运行时
composer.phar update
jsrouting-bundle 没有被移除
所以我想在第一次手动删除 jsrouting-bundle 以重新下载它。
并从我的 git repo 中毫无问题地删除供应商
谢谢你的帮助
编辑:
我解决了第一部分:
我去了 verdor>composer>autoload_namespace.php 并删除了这一行:
'FOS\\JsRoutingBundle' => array($vendorDir . '/friendsofsymfony/jsrouting-bundle'),
我还从供应商文件夹中删除了 JsRoutingBundle,然后 composer 重新安装了 JsRoutingBundle。
但我想要一个提示以正确删除我的供应商文件夹