switon / kernel
Application bootstrap for environment, config, provider lifecycle, and fatal error handling for Switon Framework
v1.0.0
2026-06-06 13:43 UTC
Requires
- php: >=8.3
- psr/log: ^2.0
- switon/command: ^1.0
- switon/composer-extra: ^1.0
- switon/core: ^1.0
- switon/di: ^1.0
- switon/event: ^1.0
- switon/yaml: ^1.0
Requires (Dev)
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- switon/testing: ^1.0
README
Switon's application bootstrap kernel for env loading, config merging, provider lifecycle, and fatal handling.
Highlights
- Single bootstrap entrypoint:
KernelInterface::start()starts the application from one contract. - Config loading: root YAML and PHP config files are merged together.
- Provider discovery and overrides: built-in and app providers are loaded in one bootstrap flow.
- Autowiring and boot order: services are wired before runtime control is handed over.
- Fatal handling: the kernel sets up fatal handling during bootstrap.
- Runtime checks: the kernel includes a version command for quick verification.
Installation
composer require switon/kernel
Quick Start
use Switon\Kernel\Kernel; class AppKernel extends Kernel { public function start(): void { parent::start(); // Attach HTTP server, CLI loop, worker, etc. } } (new AppKernel(__DIR__))->start();
Docs: https://docs.switon.dev/latest/kernel
License
MIT.