Speeding Up Laravel Tests with tmpfs (MySQL in RAM)
If your Laravel test suite is painfully slow and does a lot of database work (multi-tenancy, migrations, seeding), the bottleneck is almost…
In new Laravel applications, the $routeMiddleware property of the App\Http\Kernel class has been renamed to $middlewareAliases to better reflect its purpose. Here's how you should understand and work with these arrays:
$middlewareAliases (new in Laravel 10.x):
CheckUserStatus middleware, you might register it in $middlewareAliases with the 'user.status' alias. You'd then use this alias to attach the middleware to specific routes: Route::get('/dashboard', 'DashboardController')->middleware('user.status');$routeMiddleware (from Laravel 9.x and earlier):
$middlewareAliases, it seems Laravel 10.x maintains compatibility with the $routeMiddleware property from earlier versions. This decision is likely for backward compatibility, allowing easier upgrades from previous versions without breaking existing middleware registrations.$middlewareAliases array, and it will work as expected. However, since $middlewareAliases is the new standard going forward, it might be best to use that array for new middleware to keep up with the latest practices.$middlewareGroups:
Given that both $routeMiddleware and $middlewareAliases are operational, you have some flexibility. For maintaining modern standards and forward compatibility, it's advisable to use $middlewareAliases for registering new middleware.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com