symfony - 为什么 Travis-CI 和 composer 在 clear:cache (Symfony) 期间执行查询
问题描述
我尝试用 symfony 配置 Travis-ci(不容易!)。当我运行 composer install 时,刚下载完所有包,composer 尝试清除缓存,并执行 SQL 查询(为什么?),但找不到表(迁移命令在之后)。我不明白,为什么作曲家尝试执行查询。
这是 travisci.yml 中的代码:
install:
- cp .env.dist .env
- mysql -e 'create database testing;'
- composer install
after_install:
- php ./bin/console doctrine:migrations:diff
- php ./bin/console doctrine:migrations:migrate --no-interaction
#- php bin/console doctrine:migrations:migrate
#- php bin/console doctrine:fixtures:load -n --env=test
#- ./vendor/bin/simple-phpunit install
- ./bin/phpunit install
结果:
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! // Clearing the cache for the dev environment with debug
!! // true
!!
!!
!! In AbstractMySQLDriver.php line 62:
!!
!! An exception occurred while executing 'SELECT t0.id AS id_1, t0.created AS
!! created_2, t0.updated AS updated_3, t0.name AS name_4, t0.source AS source_
!! 5 FROM twig_template t0 WHERE t0.name = ? LIMIT 1' with params [{}]:
!!
!! SQLSTATE[42S02]: Base table or view not found: 1146 Table 'testing.twig_tem
!! plate' doesn't exist
!!
!!
!! In PDOStatement.php line 144:
!!
!! SQLSTATE[42S02]: Base table or view not found: 1146 Table 'testing.twig_tem
!! plate' doesn't exist
!!
!!
!! In PDOStatement.php line 142:
!!
!! SQLSTATE[42S02]: Base table or view not found: 1146 Table 'testing.twig_tem
!! plate' doesn't exist
!!
或详细信息:https ://travis-ci.org/Dannebicque/intranetV3/builds/455840273
谢谢你的帮助大卫
解决方案
推荐阅读
- javascript - 在 Laravel 中使用通用视差 javascript 库
- php - 使用 PHP 在 Active Directory 上对用户进行身份验证时凭据无效
- android - 如何重新附加片段(片段未附加到活动 Kotlin)
- dictionary - Kotlin 将数字数组列表元素转换为 BigDecimal
- android - 通过 Android Share 共享的图像 - 是否允许获取有关图像来源的信息?
- python - Imgur API:当照片不属于用户帐户时,找不到 404 响应
- vb.net - VB.net 读取 Cobol 文件字段(纯二进制、EBCDIC、打包)
- python - 使用python从一个文件中删除另一个文件中存在的行
- python - 如何在 Matplotlib 中使用 datetime 绘制 3D 条形图
- c++ - 我在 C++ 中收到了这个错误,但不知道为什么,(我是一年级大学生)