Releases: citomni/kernel
Releases · citomni/kernel
CitOmni Kernel v1.0.0 - Initial stable release
CitOmni Kernel v1.0.0 - Initial stable release
Ultra-lean application kernel for CitOmni-based apps. PHP 8.2+, PSR-4, deterministic boot, zero runtime "magic".
Highlights
- Deterministic config merge ("last wins"):
vendor baseline -> providers -> app base cfg -> env overlay (citomni_{http|cli}_cfg.{ENV}.php) - Service precedence (array union): app + provider + vendor
- Deep, read-only
Cfgwrapper with property chaining andArrayAccess
(routesis intentionally returned as a raw array:$app->cfg->routes['/']['controller']) - Lazy service locator via explicit service map
(FQCN or['class'=>FQCN,'options'=>[...]]; ctor contract:__construct(App $app, array $options = [])) - Compiled caches (auto-consumed):
var/cache/cfg.{http|cli}.php,var/cache/services.{http|cli}.php - Atomic cache writer:
App::warmCache(overwrite: true, opcacheInvalidate: true) - Mode-aware (
Mode::HTTP/Mode::CLI) - delivery-agnostic kernel - Fail-fast: no catch-all; errors bubble to the global handler
- Handy helpers:
hasService(),hasAnyService(),hasPackage(),hasNamespace(),memoryMarker()
The kernel does not ship HTTP/CLI controllers, routers, or error handlers. Those live in
citomni/httpandcitomni/cli. The kernel stays infrastructure-only and small.
Compatibility
- PHP: 8.2+
- Autoload: PSR-4 (
"CitOmni\\Kernel\\": "src/") - SemVer: public API stable as of 1.0.0
Installation
composer require citomni/kernel:^1.0Use alongside citomni/http and/or citomni/cli in your application.
Migration notes (from pre-1.0 / alpha)
routesis a deliberate raw array node: use$app->cfg->routes['/']['controller'](not->controller).- Service map precedence is explicit: app + provider + vendor.
Appexpects an absolute/configpath and aModeenum at construction; in typical apps, the HTTP/CLI layer handles path resolution and env constants.
Known limitations
- The kernel does not install error handlers; delivery layers do (
citomni/http,citomni/cli). - No runtime namespace scanning for services; everything is explicit via maps (by design).
Thanks
Thanks to everyone who helped test boot paths, caches, and docs. We kept it tiny so your TTFB can stay happy.