Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

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.