在配置文件app/config/parameters.yml
NEXT之后抛出错误,我该如何修复?
通过作曲家安装symfony:
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.
答案 0 :(得分:4)
如documentation中所述,您必须将@
加倍@@
来逃避parameters:
# ...
database_password : "@@admin1"
:
import string
alphalower = string.ascii_lowercase
alphaupper = string.ascii_uppercase
digs = string.digits
def checkio(data):
if len(data) >= 10:
if data.count(digs) >= 1:
if data.count(alphaupper) >= 1:
if data.count(alphalower) >= 1:
return True
else:
return False
感谢Falc his/her answer。