public function createKernel($kernelName, $environment = 'dev')
    {
        if (!class_exists($kernelName)) {
            $appDir = $this->projectRoot . DIRECTORY_SEPARATOR . $this->appDir;
            $kernelFile = $appDir . DIRECTORY_SEPARATOR . $kernelName . '.php';
            if (!file_exists($kernelFile)) {
                throw new \InvalidArgumentException(sprintf('Kernel %s not found in %s', $kernelName, $appDir));
            }

            require $kernelFile;

            if (!class_exists($kernelName)) {
                throw new \RuntimeException(sprintf('Kernel %s not found in file %s', $kernelName, $kernelFile));
            }
        }

        $kernel = new $kernelName($environment, false);

        return $kernel;
    }