Skip to content

Micro-Kernel for PHP Applications

Latest Stable Version License Test Coverage Build Status

This library contains a micro-kernel for bootstrapping almost any PHP application, including Silex, Symlex (a framework stack for agile Web development based on Symfony) and Symfony Console. The kernel itself is just a few lines to set a bunch of environment parameters and create a service container instance with that.

Micro-Kernel Architecture

Run an App

Creating a kernel instance and calling run() is enough to start an application:

#!/usr/bin/env php

// Composer autoloader
require_once 'vendor/autoload.php'; 

$app = new \DIMicroKernel\Kernel('console');

// Run the 'app' service defined in config/console.yml


To use this library in your project, simply run composer require symlex/di-microkernel or add "symlex/di-microkernel" to your composer.json file and run composer update:

    "require": {
        "php": ">=7.1",
        "symlex/di-microkernel": "^2.0"