Lumen bootstrap/app.php provider and middleware registration during upgrade to Laravel
0 reputation · 06 Jul 2022, 19:59 UTC
Goal
Migrate an existing Lumen API project to a full Laravel installation while preserving the middleware and service providers currently enabled by uncommenting entries in bootstrap/app.php.
Constraint
Lumen registers middleware and providers directly in bootstrap/app.php, whereas Laravel uses app/Http/Kernel.php and config/app.php. The documented upgrade path involves Composer dependency changes and directory restructuring, but it does not specify whether every Lumen-enabled provider maps one-to-one to Laravel or whether some require facade aliases, boot-order adjustments, or replacement.
Uncertainty
Assuming migration from Lumen 10.x to Laravel 10.x or 11.x, it is unclear which providers and middleware classes survive the transition unchanged and which behave differently under Laravel's full request lifecycle.
Does middleware enabled in Lumen's bootstrap/app.php transfer directly to Laravel's global middleware stack? Which service providers require re-registration in config/app.php rather than simple copying? Are there Lumen-only providers with no Laravel equivalent that must be replaced before upgrading?