I know that env variables are string only. Symfony 3.4 supports env variables type casting. Is there a way to pass null value through int validator?
.env
DATABASE_PORT=
#I also tried DATABASE_PORT=null, DATABASE_PORT=~
parameters.yml
app.connection.port: '%env(int:DATABASE_PORT)%'
#I also tried env(?int, env(int?
I'm getting an error: "Non-numeric env var "DATABASE_PORT" cannot be cast to int." or "Invalid env(?int:DATABASE_PORT) name: only "word" characters are allowed."
In yml there are ~ or null signs used to pass null, e.g:
app.connection.port: ~