Some values the panel needs, such as secrets, come from environment variables, supplied either through the process environment or through a local env file. They are needed while the panel is being configured. Once it has been, nothing should depend on reading them directly.
Environment variables are held by Env, a static singleton initialised once during bootstrap from either the
$_ENV superglobal or an env file, and it exists only during initial bootstrapping. Initialising it a second time,
or reading from it before it has been initialised, throws, and its typed accessors throw when a value cannot be cast
to the type requested. Code outside bootstrap does not read environment variables.
No alternatives were weighed.
Easier:
Harder:
Env, so keeping it to bootstrap relies on
discipline.Env alone, without populating $_ENV, so nothing else in the process sees its values.Constrained:
$_ENV superglobal or a local env
file.Env, which is
created.Env is used before initialisation or initialised twice.Env as merged, which
is decided.Env being a static singleton by design that exists only during initial bootstrapping, and its typed accessors
throwing when a value cannot be cast: first written down on 2026-09-14.Env while it is loaded, taken from what followed rather than anticipated.