"composer create-project symfony/framework-standard-edition my_project_name"というコンポーザーコマンドでSymfonyプロジェクトを作成し、リモートホスティングとしてgitとGitHubを使用してバージョン管理しました。 追加で、私は継続的な統合とステータスチェックのためにTravis-CIを使用し、展開のためにHerokuを使用する必要があります。Symfony + Travis-CI + Heroku + GitHub基本的な.gitignoreとtravis.yml?
私は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
This is the log of travis-ci failing
は不足があるということですベンダーのディレクトリの依存関係は、herokuのエラーメッセージを解決するために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
travis-ciとherokuの両方で動作させるために、ベンダのディレクトリのバージョンを変更したり、何か他の方法で動作させるためのコマンドや変更はありますか?前もって感謝します。