2
我部署的Symfony 2應用在ElasticBeanstalk但是當我運行此我得到一個錯誤說錯誤ElasticBeanstalk安裝--no-dev的選項與Symfony的2
ERROR: Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle class not found.
我有這個配置。
container_commands:
110-remove-pg:
command: "yum remove -y php56-pgsql"
120-install-pglib:
command: "yum install -y postgresql94-libs"
130-install-pg:
command: "yum install -y php56-pgsql"
140-clear-folder:
command: "rm -rf var/cache/* var/logs/* var/sessions/*"
150-folder-config:
command: "source .ebextensions/bin/folder.sh"
160-pre-cache-clear:
command: "php bin/console cache:clear --env=prod --no-debug"
170-run-export:
command: "export SYMFONY_ENV=prod"
180-composer-install-no-dev:
command: "composer.phar install --no-dev --optimize-autoloader"
190-post-cache-clear:
command: "php bin/console cache:clear --env=prod --no-debug"
200-assets-dump:
command: "php bin/console assetic:dump --env=prod --no-debug"
210-remove-dev-app:
command: "rm web/app_dev.php"
似乎它仍然觸發DEV選項。如果我刪除--no-dev選項,它工作正常。但我不想要DEV包。無論如何要解決這個問題。
也許你包括SensioGeneratorBundle在AppKernel爲每ENV(應該僅包括DEV) '如果(in_array($這個 - > getEnvironment(),數組( '開發', '測試'))){ ... $ bundles [] =新的Sensio \ Bundle \ GeneratorBundle \ SensioGeneratorBundle(); ... } ' –