Been trying for a wee while, but no joy so far. This worked in Craft 3, but not in Craft 4.
It's a CSS cache buster, I basically want a variable to set in env, then taken into general.php[caveat] and then onto a template.
It seems you cannot have custom variables in Craft 4 in config/general.php. I've created a config/custom.php
// env
testtest=123456
// config/custom.php
'variablestored' => getenv('testtest'),
//template
{{ craft.app.config.general.variableStored }}
Results in an error: Calling unknown method: craft\config\GeneralConfig::variableStored()
Many thanks.