PHP compatibility and project lifecycle
Official page states PHP >= 8.2 with OpenSSL, PDO and Mbstring extensions. PHP 8.4 and 8.5 behavior is not stated and is unknown. Lumen is separate from Laravel and does not intentionally support Laravel libraries such as Cashier, Passport or Scout.
Official sources checked 2026-10-22. Browser lessons on this site run PHP 8.5.
This guide is for historical context and migration research.
Sources and evidence limits
It relies only on the single official Lumen documentation page supplied for this guide. Where that page is silent, this guide says the answer is unknown.
What Lumen is
Lumen is a PHP microframework from the Laravel ecosystem. It is a framework, which means it is a library of components and conventions that runs on top of PHP. It is not a PHP runtime, an interpreter, an async library or a CMS. PHP core is the language engine that executes your code. A framework such as Lumen is ordinary PHP code that your application loads. A CMS product such as Drupal is a complete content-management application with its own data model and administration interface. Lumen has none of that.
The official documentation says that PHP has made many performance improvements since Lumen was released. It also says Laravel Octane is now available. For those reasons the Lumen project no longer supports beginning new projects with Lumen and recommends always beginning new projects with Laravel. This guide therefore treats Lumen as historical. Do not choose it for new production work. Read this page mainly to understand and maintain an existing Lumen codebase, or to plan a move to Laravel.
The lifecycle value for this entry is historical. The supplied page does not state a retirement date, a security-fix policy or a final release number, so all of those are unknown.
Architecture
The supplied page describes very little of the internals. These points are documented:
- Configuration options for the framework live in an environment file named .env.
- The project is served from a public directory.
- Lumen is a totally separate framework from Laravel.
Because it is separate, Lumen does not intentionally offer compatibility with additional Laravel libraries. The page names Cashier, Passport and Scout as examples. If an application needs that functionality, the page says to use the Laravel framework. Details about routing, the service container, middleware and the bootstrapping sequence are not in the supplied source, so this guide does not describe them.
Execution model
The documented local serving method is PHP's built-in development server pointed at the public directory. That is a classic request lifetime. PHP starts handling a request, your application boots, the response is produced and per-request state is discarded. Cleanup is largely automatic, because variables, objects and static properties disappear when the request ends.
The page mentions Laravel Octane as part of its reasoning, but it does not describe running Lumen in a persistent worker. Whether Lumen works under Octane, Swoole, Open Swoole or any other long-running worker is unknown from this source. Do not assume it does. Swoole and Open Swoole are distinct projects. The supplied page says nothing about either, and the Lumen guidance points to Laravel for that direction.
State leakage in persistent workers
In a persistent worker the process stays alive across many requests, so state that was cheap to ignore in a classic request can leak between users. This is general PHP knowledge, not a claim about Lumen internals. Typical risks:
- Static properties and global variables that keep the previous request's data.
- Singletons or container-bound objects that cache a user, tenant, locale or request.
- Open database connections, transactions or file handles left in an unexpected state.
- Growing in-memory caches that are never trimmed.
The usual remedy is to treat each request as disposable. Avoid mutable static state, reset or rebuild request-scoped services at the end of each request, and close or reset connections. Restart workers periodically. Because the Lumen source gives no worker-mode guidance, an existing Lumen application should be audited for these patterns before anyone considers a persistent worker, and the better path is a migration to Laravel.
Practical use cases today
- Maintaining an existing Lumen service while a migration to Laravel is planned.
- Reading legacy code to understand what a small service does before rewriting it.
- Auditing an inherited project's environment against the documented requirements.
A new API or microservice should start in Laravel, as the official page advises.
Installation approach
The supplied page contains a note and requirements but no Composer create-project command. The exact package name and install command are therefore not stated here, and this guide does not invent them. The documented requirements are:
- PHP 8.2 or newer.
- The OpenSSL, PDO and Mbstring PHP extensions.
The learning track uses PHP 8.4, with PHP 8.5 planned. The page states a minimum of PHP 8.2 and does not name 8.4 or 8.5. Whether Lumen has been verified on 8.4 or 8.5 is unknown, so any such run needs its own integration check.
After installation the page says to rename .env.example to .env if you have not already, and to set the application key to a random string, typically 32 characters. If the key is not set, user encrypted data will not be secure. Never commit real keys to version control.
The example below does not install Lumen. It is a small standalone requirements checker that you copy into an existing Lumen project, so it also works as a pre-migration audit step. It is a command-line exercise, not a browser exercise.
Strengths
- Official guidance is clear: start new projects with Laravel.
- The documented requirements are short and easy to check.
- Configuration is centralized in the .env file.
Limitations
- Historical status, with no new projects supported.
- No intentional compatibility with Laravel libraries such as Cashier, Passport or Scout.
- No documented worker-mode, Octane or Swoole support in the supplied source.
- Current version, support window, license and tested PHP 8.4 or 8.5 behavior are unknown from the supplied page.
Deployment
The source documents local serving only: Laravel Homestead, Laravel Valet, or the built-in PHP server using the public directory. It gives no production deployment instructions, so those are unknown here. Bind the development server to 127.0.0.1 only, and never expose it or any FastCGI endpoint publicly. For production planning, migrate to Laravel and follow its official documentation.
Links
The only official source used is the Lumen documentation page listed in the links.
Practical examples
These examples have not been run in a live environment yet. Commands and versions follow the official documentation linked on this page; check them before relying on them, and report a problem if one does not work.
Requirements checker for an existing Lumen project (CLI)
A standalone PHP script that checks the requirements listed in the official Lumen docs (PHP 8.2 or newer, OpenSSL, PDO, Mbstring), then confirms that .env and public exist. Copy it into the tools directory of an existing legacy Lumen project and run it from the project root. It does not install Lumen and does not read secrets.
tools/check-lumen-requirements.php
declare(strict_types=1);
// Run from the project root: php tools/check-lumen-requirements.php
// Checks only items named in the official Lumen docs page.
$problems = [];
if (version_compare(PHP_VERSION, '8.2.0', '<')) {
$problems[] = 'PHP 8.2 or newer is required; found ' . PHP_VERSION;
}
foreach (['openssl', 'pdo', 'mbstring'] as $extension) {
if (!extension_loaded($extension)) {
$problems[] = 'Missing PHP extension: ' . $extension;
}
}
$root = dirname(__DIR__);
if (!is_file($root . '/.env')) {
$problems[] = 'No .env file found; copy .env.example to .env and set the application key.';
}
if (!is_dir($root . '/public')) {
$problems[] = 'No public directory found; run this script from a Lumen project.';
}
echo 'PHP version: ' . PHP_VERSION . PHP_EOL;
if ($problems === []) {
echo 'OK: documented requirements are present.' . PHP_EOL;
echo 'Reminder: confirm the application key in .env is set to a random string.' . PHP_EOL;
exit(0);
}
foreach ($problems as $problem) {
echo 'PROBLEM: ' . $problem . PHP_EOL;
}
exit(1);
Install and run
php tools/check-lumen-requirements.php
php -S 127.0.0.1:8000 -t publicExpected behavior
The first command prints the PHP version and either an OK message or one PROBLEM line per missing requirement, exiting with code 1 on problems. The second command, which applies only if the project has a public directory, starts PHP's built-in development server bound to 127.0.0.1 port 8000 and serves that directory.
Requires an existing Lumen project, because the source supplies no create-project command. The built-in server is documented for local use only and is not a production deployment. The script checks only the documented requirements and cannot confirm Lumen works on PHP 8.4 or 8.5.