Heroku Log:
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Creating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
In AbstractMySQLDriver.php line 103:
An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused
In PDOConnection.php line 47:
SQLSTATE[HY000] [2002] Connection refused
In PDOConnection.php line 43:
SQLSTATE[HY000] [2002] Connection refused
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:
In AbstractMySQLDriver.php line 103:
An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused
In PDOConnection.php line 47:
SQLSTATE[HY000] [2002] Connection refused
In PDOConnection.php line 43:
SQLSTATE[HY000] [2002] Connection refused
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] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
! Push rejected, failed to compile PHP app.
! Push failed
脚本Sensio \ Bundle \ DistributionBundle \ Composer \ ScriptHandler :: clearCache处理以异常终止的symfony-scripts事件
[RuntimeException]
执行“'cache:clear --no-warmup'”命令
时发生错误composer.json:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle"
},
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
"autoload-dev": {
"psr-4": { "Tests\\": "tests/" },
"files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
},
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"easycorp/easyadmin-bundle": "^1.17",
"friendsofsymfony/user-bundle": "~2.0",
"incenteev/composer-parameter-handler": "^2.0",
"knplabs/knp-paginator-bundle": "^2.7",
"mgilet/notification-bundle": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"symfony/assetic-bundle": "^2.8",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/symfony": "3.4.*",
"symfony/var-dumper": "^3.4",
"ext-apcu": "^5.1.7",
"twig/twig": "^1.0||^2.0",
"vich/uploader-bundle": "^1.4",
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"config": {
"platform": {
"php": "5.5.9"
},
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "3.4-dev"
}
}
}
我更新了作曲家添加了一个require ext-apcu并要求生成器包
idk问题出在哪里,似乎并不常见。
答案 0 :(得分:0)
可能Doctrine正在尝试确定数据库平台版本。
尝试将服务器版本添加到Doctrine DBAL配置中(请参阅此处的答案:https://stackoverflow.com/a/34024275/695091):
#config.yml
doctrine:
dbal:
...
server_version: 5.7