-
|
I'm not sure this is a bug, per se, which is why I didn't raise this question as an issue. Currently (v4.0.2) In the documentation on "Environments and Configuration," the recommendation is to change your config settings to something like the following, calling it the "canonical accessor": However, in the 3.x to 4.0 guide it recommends this syntax as the "canonical pattern": This is because (apparently) So my question is -- which syntax should I use? Is this just a case of the docs being out of sync? (The same question applies to Thanks for any guidance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Thanks for the careful write-up, @teleotic — this is exactly the kind of report we like to get, and you've actually surfaced more than one thing. Short version: you're right to be uncomfortable, the two doc snippets are partly out of sync, and the more important issue is the scaffold itself. Here's what we found after tracing the code. What's actually going onThree independent things are tangled together here:
And the thing you only half-named, which is the one that matters most: the generator hardcodes the random password as a literal into For blast-radius context: the reload password gates What you can do right now (workaround)In // Reload your application with ?reload=true&password=<the RELOAD_PASSWORD value from your .env>
set(reloadPassword = env("RELOAD_PASSWORD", ""));Then:
The random value is already in your Stick with On your What we intend to fix (next patch release)
Thanks again — this was a well-scoped report and it's prompting a real cleanup. I'll link the PRs here once they're up. |
Beta Was this translation helpful? Give feedback.
-
|
Update — fixed and merged in #2857 (squashed to What changed, mapping to what you raised:
Your actual question — which syntax: Ships in: the next official patch release, 4.0.3. Want to try it before then? It's already in the bleeding-edge channel ( # macOS (Homebrew)
brew uninstall wheels && brew install wheels-be# Windows (Scoop) — same idea as Homebrew
scoop uninstall wheels
scoop install wheels-be# Debian/Ubuntu — apt swaps wheels → wheels-be automatically (Replaces/Conflicts)
echo "deb [signed-by=/usr/share/keyrings/wheels.gpg] https://apt.wheels.dev bleeding-edge main" \
| sudo tee /etc/apt/sources.list.d/wheels-be.list
sudo apt update && sudo apt install wheels-be# Fedora/RHEL
sudo dnf remove wheels && sudo dnf config-manager --add-repo https://yum.wheels.dev/wheels-be.repo && sudo dnf install wheels-be
Thanks again — your report turned into a clean sweep across the scaffold, CLI, and docs. |
Beta Was this translation helpful? Give feedback.
Thanks for the careful write-up, @teleotic — this is exactly the kind of report we like to get, and you've actually surfaced more than one thing. Short version: you're right to be uncomfortable, the two doc snippets are partly out of sync, and the more important issue is the scaffold itself. Here's what we found after tracing the code.
What's actually going on
Three independent things are tangled together here:
The accessor —
env(...)vsapplication.wo.env(...)is cosmetic. Both call the same helper (vendor/wheels/Global.cfc), which checksapplication.env(your.env) first, then OS environment variables, then your default. Insideconfig/settings.cfmthe bareenv()form works for the sam…