Configuration and bootstrap lifecycle
What is loaded
Section titled “What is loaded”Engine Config loads PHP files into a tree keyed by their relative filename. config/app.php becomes app., database.php becomes database., and nested enabled plugin configs become their path sections. Config::get() resolves dotted keys; Config::set(array) recursively merges values. Config::reloadAll() clears/reloads configuration, excluding executable route config when requested by Autoload. This is not a universal environment-overlay system.
A file named config/production.php returning app/server subarrays becomes production.app / production.server. The reviewed loader does not automatically apply it over app/server just because APP_ENV=production. Set the effective app/server config or implement and test an explicit overlay. Do not deploy the example file and assume debug became false.
Startup stages
Section titled “Startup stages”The Web master loads Composer, establishes paths, loads environment and invokes Autoload. Autoload reloads config, configures error handling/timezone, initializes CLI or Server context, includes configured autoload files, then bootstraps available components. Database/session/router/middleware/events bootstrap behavior is component-specific; Cron uses its Autoload entry. User files and route files are executable PHP and can have side effects.
Long-running process consequences
Section titled “Long-running process consequences”Configuration, globals, static registries and loaded classes can persist. Reload worker/config changes deliberately, avoid per-user data in global config and validate effective values after startup. Environment strings need explicit numeric/boolean parsing where typed APIs consume them; the worker-count cast is shown in the quick start. A string false is not automatically a boolean false.
Failure recovery
Section titled “Failure recovery”Syntax errors, missing classes, unreadable paths and bootstrap exceptions can prevent startup. Validate configuration in an isolated environment, monitor startup logs, verify listeners and keep the previous artifact/config. A health response alone does not prove sessions, DB queries, plugins or command packaging work.
Config source · Web source. Reviewed 2026-10-17; Ivan Zorin / Localzet Group.