Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Symfony+;特拉维斯CI+;赫罗库+;GitHub basic.gitignore和travis.yml?_Php_Heroku_Github_Symfony_Travis Ci - Fatal编程技术网

Php Symfony+;特拉维斯CI+;赫罗库+;GitHub basic.gitignore和travis.yml?

Php Symfony+;特拉维斯CI+;赫罗库+;GitHub basic.gitignore和travis.yml?,php,heroku,github,symfony,travis-ci,Php,Heroku,Github,Symfony,Travis Ci,我使用composer命令创建了一个Symfony项目:“composer创建项目Symfony/framework标准版my_project_name”,并使用git和GitHub作为远程主机将其置于版本控制之下。 此外,我需要使用Travis CI进行持续集成和状态检查,并使用Heroku进行部署 作为我第一次使用Symfony、travis和heroku,我在配置文件方面遇到了一些问题 这是我的.gitignore文件: /.idea /app/config/parameters.yml

我使用composer命令创建了一个Symfony项目:“composer创建项目Symfony/framework标准版my_project_name”,并使用git和GitHub作为远程主机将其置于版本控制之下。 此外,我需要使用Travis CI进行持续集成和状态检查,并使用Heroku进行部署

作为我第一次使用Symfony、travis和heroku,我在配置文件方面遇到了一些问题

这是我的.gitignore文件:

/.idea
/app/config/parameters.yml
/build/
/phpunit.xml
/var/*
!/var/cache
/var/cache/*
!var/cache/.gitkeep
!/var/logs
/var/logs/*
!var/logs/.gitkeep
!/var/sessions
/var/sessions/*
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/vendor/
/web/bundles/
这是我的.travis.yml文件:

language: php
php:
  - '5.5'
  - '5.6'
  - '7.0'
  - hhvm
  - nightly

据我所知,供应商目录下缺少依赖项,由于解决了heroku bild的错误消息,git忽略了该依赖项:

-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
       - php (7.1.0)
       - apache (2.4.20)
       - nginx (1.8.1)
-----> Installing dependencies...
       Composer version 1.2.2 2016-11-03 17:43:15
 !     WARNING: Your Composer vendor dir is part of your Git repository.
       This directory should not be under version control; only your
       'composer.json' and 'composer.lock' files should be added, which
       will let Composer handle installation of dependencies on deploy.
       To suppress this notice, first remove the folder from your index
       by running 'git rm -r --cached vendor/'.
       Next, edit your project's '.gitignore' file and add the folder
       '/vendor/' to the list.
       For more info, refer to the Composer FAQ: https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md
       Loading composer repositories with package information
       Installing dependencies from lock file
         - Removing symfony/phpunit-bridge (v3.1.7)
         - Removing sensio/generator-bundle (v3.1.1)
       Generating optimized autoload files
       > Incenteev\ParameterHandler\ScriptHandler::buildParameters
       Updating 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_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/app/AppKernel.php:25
       Stack trace:
       #0 /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(396): AppKernel->registerBundles()
       #1 /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(114): Symfony\Component\HttpKernel\Kernel->initializeBundles()
       #2 /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()
       #3 /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/Symfony/Component/Console/Appli in /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/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_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/app/AppKernel.php:25                                                                                   
         Stack trace:                                                                                                                                                                                                                         
         #0 /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(396): AppKernel->registerBundles()                                                          
         #1 /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(114): Symfony\Component\HttpKernel\Kernel->initializeBundles()                              
         #2 /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()                             
         #3 /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/Symfony/Component/Console/Appli in /tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/app/AppKernel.php on line 25  
         .                                                                                                                                                                                                                                    


       install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

 !     Push rejected, failed to compile PHP app.
 !     Push failed
检测到PHP应用程序 ----->自举。。。 ----->正在安装平台软件包。。。 -php(7.1.0) -apache(2.4.20) -nginx(1.8.1) ----->正在安装依赖项。。。 作曲家版本1.2.2 2016-11-03 17:43:15 ! 警告:Composer供应商目录是Git存储库的一部分。 此目录不应处于版本控制下;只有你的 应添加“composer.json”和“composer.lock”文件,这 将让Composer在部署时处理依赖项的安装。 若要取消显示此通知,请首先从索引中删除该文件夹 通过运行“git rm-r--cached vendor/”。 接下来,编辑项目的“.gitignore”文件并添加文件夹 将“/vendor/”添加到列表中。 有关更多信息,请参阅Composer常见问题解答:https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md 使用包信息加载composer存储库 从锁文件安装依赖项 -拆除symfony/phpunit桥(v3.1.7) -卸下sensio/发电机线束(v3.1.1) 生成优化的自动加载文件 >IncenteV\ParameterHandler\ScriptHandler::buildParameters 更新“app/config/parameters.yml”文件 >Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap >Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache PHP致命错误:未捕获Symfony\Component\Debug\Exception\ClassNotFoundException:试图从命名空间“Sensio\Bundle\GeneratorBundle”加载类“SensioGeneratorBundle”。 您是否忘记了另一个名称空间的“use”语句?在/tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/app/AppKernel.php:25中 堆栈跟踪: #0/tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/symfony/Component/HttpKernel/Kernel.php(396):AppKernel->registerBundles() #1/tmp/build඙ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/symfony/Component/HttpKernel/Kernel.php(114):symfony\Component\HttpKernel\Kernel->->initializeBundles() #2/tmp/build඙ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/symfony/Bundle/FrameworkBundle/Console/Application.php(68):symfony\Component\HttpKernel\Kernel->->boot() #3/tmp/build඙5A9CE634E19D2AF5D00BD7A3F9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/symfony/Component/Console/Appli-in/tmp/build඙඙5A9CE634E19D2AF5D00BD7A3F9/izio7-YourTeam-8f31587/app/app/AppKernel.php第25行 Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache处理symfony脚本事件时异常终止 [运行时异常] 执行“'cache:clear--no warmup'”命令时出错: PHP致命错误:未捕获Symfony\Component\Debug\Exception\ClassNotFoundException:试图从命名空间“Sensio\Bundle\GeneratorBundle”加载类“SensioGeneratorBundle”。 您是否忘记了另一个名称空间的“use”语句?在/tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/app/AppKernel.php:25中 堆栈跟踪: #0/tmp/build_3481ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/symfony/Component/HttpKernel/Kernel.php(396):AppKernel->registerBundles() #1/tmp/build඙ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/symfony/Component/HttpKernel/Kernel.php(114):symfony\Component\HttpKernel\Kernel->->initializeBundles() #2/tmp/build඙ed5a9ce634e19d2af5d00bd7a3f9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/symfony/Bundle/FrameworkBundle/Console/Application.php(68):symfony\Component\HttpKernel\Kernel->->boot() #3/tmp/build඙5A9CE634E19D2AF5D00BD7A3F9/izio7-YourTeam-8f31587/vendor/symfony/symfony/src/symfony/Component/Console/Appli-in/tmp/build඙඙5A9CE634E19D2AF5D00BD7A3F9/izio7-YourTeam-8f31587/app/app/AppKernel.php第25行 . 安装[--首选源][--首选区][--干燥-
language: php
php:
  - '5.5'
  - '5.6'
  - '7.0'
  - hhvm
  - nightly

before_script: composer install