Closed AshleyJackson closed 8 months ago
The values within the config are replaced recursively throughout (relevant code), so if this wasn't working, it'd be a bug.
When using a static number for port, the script works perfectly, and yes I can confirm that the environment variable "MYSQL_PORT" exists and has a number in it.
However, I think this is the issue? Per the docs, phinx only picks up and injects any variables from the environment that start with PHINX_
. So you'd want to set PHINX_MYSQL_PORT
within your environment to have %%PHINX_MYSQL_PORT%%
get replaced within your config, while variable named MYSQL_PORT
will get ignored and not be used.
Closing this as I believe that phinx is working as expected/documented, and that the solution is to use PHINX_MYSQL_PORT
VS MYSQL_PORT
.
Feel free to re-open this issue if you still think there's a bug.
Hello,
I am currently trying run phinx with the below script in my composer.json
My phinx.github.yml looks similar to below
The above .yml file does not work and complains with the following error:
When using a static number for port, the script works perfectly, and yes I can confirm that the environment variable "MYSQL_PORT" exists and has a number in it.
Is this expected behaviour or is something broken here?
Thanks.