Installation and first application.
Install the package, prepare one HTTP entry point, and run your first request.
Requirements and installation
You need PHP 8.3, 8.4, or 8.5 and Composer. The fileinfo, mbstring, and xmlwriter extensions are required; selected modules may additionally need PDO, GD, or cURL.
composer require johnnyxlemonade/framework
php -S 127.0.0.1:8000 -t publicComposer installs the framework and its PSR dependencies. PHP’s built-in server is intended for local evaluation only.
HTTP entry point
Point the web server document root at public/. The entry point creates an application context from the project root, builds the kernel, and hands it the current request.
<?php
use Lemonade\Framework\Core\Context\ApplicationContextFactory;
use Lemonade\Framework\Core\KernelFactory;
require dirname(__DIR__) . '/vendor/autoload.php';
$context = (new ApplicationContextFactory())->fromGlobals(dirname(__DIR__));
$kernel = (new KernelFactory())->create($context);
$kernel->handle();Configuration, providers, and routes are loaded during bootstrap, so the entry point stays deliberately small.