Heroku Symfony 3.2 推送被拒绝,无法编译 PHP 应用程序 [英] Heroku Symfony 3.2 Push rejected, failed to compile PHP app

查看:38
本文介绍了Heroku Symfony 3.2 推送被拒绝,无法编译 PHP 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 heroku 上部署我的 symfony 网络应用程序时遇到了问题,以前它工作得很好.可能有什么问题?这是构建日志:http://pastebin.com/DXZH110S

I'm having trouble while deploying my symfony web app on heroku, when previously it worked just fine. What could be wrong? This is the build log: http://pastebin.com/DXZH110S

这是日志的相关部分:

生成优化的自动加载文件

Generating optimized autoload files

Incenteev\ParameterHandler\ScriptHandler::buildParameters创建app/config/parameters.yml"文件Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrapSensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCachePHP 致命错误:未捕获的 Symfony\Component\Debug\Exception\ClassNotFoundException:尝试从命名空间Sensio\Bundle\GeneratorBundle"加载类SensioGeneratorBundle".您是否忘记了另一个命名空间的use"语句?在/tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php:25堆栈跟踪:#0/tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(403): 注册Bundles-)#1/tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(113)\Symfony- InitialesB\Component\#2/tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68\)\组件\Application.php(68\)\#3/TMP/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/供应商/symfony的/symfony的/SRC/Symfony的/组件/控制台/APPLI在/tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php在线25上Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache 处理因异常而终止的 symfony-scripts 事件

Incenteev\ParameterHandler\ScriptHandler::buildParameters Creating the "app/config/parameters.yml" file Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "SensioGeneratorBundle" from namespace "Sensio\Bundle\GeneratorBundle". Did you forget a "use" statement for another namespace? in /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php:25 Stack trace: #0 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(403): AppKernel->registerBundles() #1 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(113): Symfony\Component\HttpKernel\Kernel->initializeBundles() #2 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot() #3 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/Console/Appli in /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php on line 25 Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception

 [RuntimeException]                                                                                                                                                                                                                  
 An error occurred when executing the "'cache:clear --no-warmup'" command:                                                                                                                                                            
 PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "SensioGeneratorBundle" from namespace "Sensio\Bundle\GeneratorBundle".                                                
 Did you forget a "use" statement for another namespace? in /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php:25                                                                                  
 Stack trace:                                                                                                                                                                                                                        
 #0 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(403): AppKernel->registerBundles()                                                          
 #1 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(113): Symfony\Component\HttpKernel\Kernel->initializeBundles()                              
 #2 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()                            
 #3 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/Console/Appli in /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php on line 25

推荐答案

终于解决了,问题是系统变量SYMFONY_ENV=prod没有设置.https://devcenter.heroku.com/articles/getting-started-with-symfony#configuring-symfony-to-run-in-the-prod-environment

Finally I solved, the problem was the system variable SYMFONY_ENV=prod not set. https://devcenter.heroku.com/articles/getting-started-with-symfony#configuring-symfony-to-run-in-the-prod-environment

这篇关于Heroku Symfony 3.2 推送被拒绝,无法编译 PHP 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆