Skip to content

Mode Map Base Items

scil edited this page Dec 1, 2018 · 7 revisions

All of Safety Checklist

Mode Map Base Items

item Data Pollution note Memory Leak note config
Application -
Kernel 🔧 🔧 Kernel::pushMiddleware or prependMiddleware? No worry, because there's a check: if (array_search($middleware, $this->middleware) === false) LARAVELFLY_SERVICES['kernel'], config('laravelfly.BaseServices')[\Illuminate\Contracts\Http\Kernel::class]
ServiceProvider 🖏 'publishes', 'publishGroups' are used mainly in php artisan props are associate arrays
events Dict Dict
router 🖏 🕅
routes 🔧 clone👀 props are associate arrays. LARAVELFLY_SERVICES['routes']
url(clone) 🖏 🕅; clone👀 [1],closure props 'sessionResolver','keyResolver', 'formatHostUsing','formatPathUsing' are not cloned but harmless.
url 🖏 🕅; closure props 'sessionResolver','keyResolver', 'formatHostUsing','formatPathUsing' are not cloned but harmless. LARAVELFLY_SERVICES['request']
redirect(Redirector) 🖏 🕅
Facade Dict
config Dict Methods set/push/prepend.
PHP Config 🖏 should not changed in any requests when LARAVELFLY_COROUTINE NA

  • [1]: Props routes and request of url would update (registerUrlGenerator) and also routeGenerator when setRequest.

  • 🔧: configurable

  • 🖏: works well in most cases, except basic config different in different requests. for example, UrlGenerator::$formatHostUsing is a callback/closure and keep same in most projects.But if your project has different formatHostUsing, plus hack work is needed.

  • 🔧🖏: configurable, and works well in most cases after configration.

  • NA: not applicable

  • 🕅: macros with same name should keep same.In Mode Map, Laravel Macros are not supported to avoid data pollution, because in most situations macros are always same.

  • clone👀 means LaravelFly has handled the Stale Reference problems in Laravel Official objects.