maybe those are parsed before _config.php
yeah - i’ve tried that, but using setenv in _config.php is not picked up by the yml files
@theruss is there any way to modify the value in PHP before it’s evaluated?
What's the value you want to modify and where is it first declared?
its first declared as a system envvar
So via your webserver or some CLI process using
export or some such?
Can I ask what the variable is for?
its just a url - a redis connection string
Right...and (dumb question) but why can't the right URL be declared in the first place on the desired/applicable env?
Yeah, but before we come up with solutions, I just want to know why the value of that is "wrong" such that you need to modify it in the way that you're asking 🙂
good point @theruss - i will check first and get back to you 🙂
Cool - cos that's the general idea with these vars: They're environment specific
Just thinking about options, I wonder if I could avoid relying on backticks and use
Config::modify() to set a constructor param instead
you can define different sections in the YAML and have them applied per some other env variable if needed
e.g. different config per dev/test/live env type or based on e.g. a ENV_CUSTOM_TYPE defined in your virtual host etc…
@Barry FYI the relevant docs are here: FAhzl2HMmThVN
@MichalKleiner thanks - i understand what you’re saying. Still waiting to hear back we can just do what you’re suggesting
e.g. can I specify
_config.php ? or does it need to be done earlier in the pipeline?
at what point can i define that value to have it be picked up by the yml file?
Hi all, some .yml config files use envars inside of backticks like
but you reckon if set to live, its not run on every request?
ah I see - I was using debug bar, so probably set the
SS_ENVIRONMENT_TYPE to dev
is it safe to cache that query? - i’m guessing the list of tables wont change between deploys
hi all, i see that the query
SHOW FULL TABLES WHERE Table_Type != 'VIEW'; is being run on every request. This takes 3.5ms locally, but 2seconds when deployed to mysql azure