Closed SZelenko closed 6 years ago
Do you try with one host parameter?
.env
SWARROT_RABBIT_MQ_HOST=rabbitmq
SWARROT_RABBIT_MQ_PORT=15672
SWARROT_RABBIT_MQ_LOGIN=admin
SWARROT_RABBIT_MQ_PASSWORD=admin
swarrot.yaml
swarrot:
connections:
rabbitmq:
host: %env(SWARROT_RABBIT_MQ_HOST)%:%env(SWARROT_RABBIT_MQ_PORT)%
login: %env(SWARROT_RABBIT_MQ_LOGIN)%
password: %env(SWARROT_RABBIT_MQ_PASSWORD)%
(Works for me with a mongo bundle)
Edit: not working :(
Sorry, haven't time to answer. Yes, it will not work because bundle uses separated params. Best solution, i think, is using dsn string.
Sorry for the late answer.
We're discussing dsn support on #124 which is definitively the best solution.
Did you try to cast your parameter to int like this? It may do the job until we agree on an implementation for dsn. :)
Did you try to cast your parameter to int like this? It may do the job until we agree on an implementation for dsn. :)
Oh thaks for it. I really misted this case!.. But dsn will be a good workaround :)
My .env
And has configuration:
On try clear cache i got: Invalid type for path "swarrot.connections.rabbitmq.port". Expected int, but got string.
As i know dotenv uses strings only (like bash etc..)
I think
->integerNode('port')->defaultValue(5672)->end()
should be changed to scalar with normalization to int.PS.: Used symfony/skeleton 3.4