Migrate from Lumen to StrataPHP

Lumen reached end-of-life with Laravel 11. StrataPHP offers a modular MVC alternative for PHP 8.2+.

Lumen EOL: Lumen is no longer maintained by the Laravel team. StrataPHP provides continued development for micro-framework use cases.

1. Routing

Both use closure-based routes. StrataPHP uses $router->get() instead of Lumen's $router->get() or $app->get().

Lumen

$router->get('/api/users', function () {
    return response()->json(User::all());
});

StrataPHP

$router->get('/api/users', function () {
    $users = DB::table('users')->get();
    return $this->jsonResponse($users);
});

Change: response()->json()$this->jsonResponse(). Eloquent → StrataPHP DB class.

2. Database

StrataPHP does not ship with Eloquent. It uses a lightweight PDO wrapper via strata/database.

use StrataPHP\Database\DB;

// Lumen/Eloquent: User::all()
// StrataPHP:
$users = DB::table('users')->get();

To keep using Eloquent, you can install illuminate/database and bootstrap it manually, but it's not included by default.

3. Key Differences

  StrataPHP Lumen
Maintenance Active development EOL as of Laravel 11
Database Custom PDO wrapper Eloquent ORM
Structure Modular MVC with /app, /config, /public Single file or minimal structure
Modules Admin, CMS, Auth available None built-in

Migration Steps

  1. composer create-project strataphp/skeleton my-api
  2. Copy routes/web.php from Lumen to StrataPHP routes/web.php
  3. Replace Eloquent calls with DB::table() or install illuminate/database manually
  4. Replace response()->json() with $this->jsonResponse()
  5. Test routes individually

Time estimate: Varies by project size. Basic APIs can port in 2-4 hours.

Why Switch from Lumen?

Lumen is no longer receiving feature updates. StrataPHP provides a maintained path for micro-framework apps with optional modules for admin, CMS, and auth if you need them later.

Need Help?

Post in Discord with your Lumen routes and we'll help you port them.