Use package jenssegers/agent
// Reset Agent
\Event::listen('laravels.received_request', function (\Illuminate\Http\Request $req, $app) {
$app->agent->setHttpHeaders($req->server->all());
$app->agent->setUserAgent();
});Use package barryvdh/laravel-debugbar
Not support
climode officially, you need to remove the logic ofrunningInConsole, but there may be some other issues.
// Search runningInConsole(), then annotate it
$this->enabled = $configEnabled /*&& !$this->app->runningInConsole()*/ && !$this->app->environment('testing');Use package laracasts/flash
Flash messages are held in memory all the time. Appending to
$messageswhen call flash() every time, leads to the multiple messages. There are two solutions.
1.Reset $messages by middleware app('flash')->clear();.
2.Re-register FlashServiceProvider after handling request, Refer register_providers.
-
flush/ob_flush/ob_end_flush/ob_implicit_flush:swoole_http_responsedoes not supportflush. -
dd()/exit()/die(): will lead to Worker/Task/Process quit right now, suggest jump out function call stack by throwing exception. -
header()/setcookie()/http_response_code(): Make HTTP response by Laravel/LumenResponseonly in LaravelS underlying.
$_SESSION
-
The max size of
GETrequest's header is8KB, restricted bySwoole, the bigCookiewill lead to parse$_COOKIEfail. -
The max size of
POSTdata/file is restricted bySwoolepackage_max_length, default2M.
Warning: inotify_add_watch(): The user limit on the total number of inotify watches was reached
-
Inotify limit is default
8192for mostLinux, but the amount of actual project may be more than it, then lead to watch fail. -
Increase the amount of inotify watchers to
524288:echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p, note: you need to enableprivilegedforDocker.