尝试安装Symfony 2作曲家时出错 [英] Error when trying to install symfony 2 composer

查看:99
本文介绍了尝试安装Symfony 2作曲家时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在配置文件 app / config / parameters.yml 之后,NEXT抛出错误,我该如何解决?

After the configuration file app/config/parameters.yml NEXT throws me an error, how do I fix ?

直接通过作曲家安装symfony:

install symfony right through composer:

Generating autoload files
Would you like to install Acme demo bundle? [y/N] y
Installing the Acme demo bundle.
Creating the "app/config/parameters.yml" file
Some parameters are missing. Please provide them.
database_driver (pdo_mysql): 
database_host (127.0.0.1): localhost
database_port (null): 
database_name (symfony): curso_sf
database_user (root): 
database_password (null): @admin1
mailer_transport (smtp): 
mailer_host (127.0.0.1): localhost
mailer_user (null): 
mailer_password (null): 
locale (en): es
secret (ThisTokenIsNotSoSecretChangeIt): curso_sf!

[Symfony\Component\Config\Definition\Exception\InvalidTypeException]                                  
Invalid type for path "doctrine.dbal.connections.default.password". 
Expected scalar, but got object.  

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception

[RuntimeException]                                                         

An error occurred when executing the "'cache:clear --no-warmup'" command.


推荐答案

您必须逃避 @ ,方法是将 @@ 加倍,如文档

You have to escape the @ by doubling it @@ as noted in the documentation:

parameters:
    # ...
    database_password : "@@admin1"

感谢Falc的他/她的答案

这篇关于尝试安装Symfony 2作曲家时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆