在codeship.io上运行CI构建会返回无法解释的错误。调试文本的最后几行是:
[..]
Clearing the cache for the dev environment with debug true
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets handling the post-install-cmd event terminated with an exception
[ErrorException]
Undefined property: Composer\Script\CommandEvent::$getIO
代码文档没有说明部署/构建Symfony应用程序。似乎无法创建bootstrap.php.cache
文件。
修改
我正在使用Symfony 2.4.3-DEV
,编辑器无法完成post-install-cmd
脚本,因此看起来composer在Codeship没有i / o接口。将composer self-update
添加到Codeship的安装脚本会导致相同的错误。
代码配置是:
# Set php version through phpenv. 5.3, 5.4 and 5.5 available
phpenv local 5.4
# Install dependencies through Composer
composer selfupdate
composer install --prefer-source --no-interaction --optimize-autoloader
答案 0 :(得分:1)
您是否在Select your technology to prepopulate basic commands
字段中指定了PHP?你的设置命令是什么?
phpenv local 5.5
composer install --prefer-source --no-interaction
php app/console assetic:dump --env=prod