Symfony 3 / Composer:如何正确安装项目?

时间:2018-01-24 02:23:27

标签: php symfony composer-php

我已经检查了 Symfony 3 项目并试图通过php composer.phar install 安装依赖项,但中断 cache:clear --no-warmup上,因为AppKernel.php中已使用依赖关系

在对这些行进行注释后,由于config.yml中已使用的依赖项,安装中断了。

我认为安装时间不应超过2分钟,而且我做错了。

是否有任何命令安装所有依赖项而不检查如果已经使用

编辑:这是错误消息:

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception


   Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception


  [RuntimeException]                                                                                                    
  An error occurred when executing the "'cache:clear --no-warmup'" command:                                             


  Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Fatal error: Class 'FOS\JsRoutingBundle  
  \FOSJsRoutingBundle' not found in /usr/www/users/app/app/AppKernel.php:28               
  Stack trace:                                                                                                          
  #0 /usr/www/users/app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.p  
  hp(396): AppKernel->registerBundles()                                                                                 
  #1 /usr/www/users/app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.p  
  hp(114): Symfony\Component\HttpKernel\Kernel->initializeBundles()                                                     
  #2 /usr/www/users/app/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Consol  
  e/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()                                                    
  #3 /usr/www/users/app/vendor/symfony/symfony/src/Symfony/Component/Console/Application  
  .php(117): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInpu  
  t), Object(Symfony\Component\Console\Output\ConsoleOu in /usr/www/users/app/app/AppKer  
  nel.php on line 28                         

编辑2:php composer.phar require friendsofsymfony/jsrouting-bundle

的结果
Using version ^2.1 for friendsofsymfony/jsrouting-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Killed

0 个答案:

没有答案