Skip to content

Releases: citomni/kernel

CitOmni Kernel v1.0.0 - Initial stable release

28 Sep 14:43

Choose a tag to compare

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 Cfg wrapper with property chaining and ArrayAccess
    (routes is 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/http and citomni/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.0

Use alongside citomni/http and/or citomni/cli in your application.

Migration notes (from pre-1.0 / alpha)

  • routes is a deliberate raw array node: use $app->cfg->routes['/']['controller'] (not ->controller).
  • Service map precedence is explicit: app + provider + vendor.
  • App expects an absolute /config path and a Mode enum 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.