如何在symfony 3中将依赖关系从供应商中移除



我有"继承的";一个有git依赖项的项目,我无法访问。我拥有整个/vendor目录的内容,并希望将依赖项从中移出,这样我就不需要将整个/vendor目录提交给git。我已经将具有依赖关系的目录移动到/my-vendor目录(与供应商处于同一级别(,但不知道如何将其包含在项目中。当运行composer install时,我得到:

[RuntimeException]                                                                                                                                                                                  
An error occurred when executing the "'cache:clear --no-warmup'" command:                                                                                                                           
Fatal error: Uncaught SymfonyComponentDebugExceptionClassNotFoundException: Attempted to load class "MY_BUNDLE_CLASS" from namespace "DEP_NAMEMY_BUNDLE".                                
Did you forget a "use" statement for another namespace? in /app/app/AppKernel.php:40                                                                                                                
Stack trace:                                                                                                                                                                                        
#0 /app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(406): AppKernel->registerBundles()                                                                                       
#1 /app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(113): SymfonyComponentHttpKernelKernel->initializeBundles()                                                           
#2 /app/app/AppKernel.php(21): SymfonyComponentHttpKernelKernel->boot()                                                                                                                          
#3 /app/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(137): AppKernel->boot()                                                                                   
#4 /app/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(124): SymfonyBundleFrameworkBundleConsoleApplication->registerCommands()                              
#5 /app/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(89): SymfonyBundleFrameworkBundleConsoleApplication->add(Object(SymfonyComponentConsole in /app/app/AppKernel.   
php on line 40  

正在编辑的CCD_ 5。

例如,您可以将这些捆绑包放在bundle目录中,然后向composer.json添加以下行:

"repositories": [
{
"type" : "path",
"url" : "./bundles/your-bundle"
}
]

相关内容

  • 没有找到相关文章

最新更新