fix: worker 插件增加 workerman 5.x 兼容

This commit is contained in:
邹景立 2025-01-08 11:04:48 +08:00
parent 38794b4089
commit a4e98a066a
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@
], ],
"require": { "require": {
"php": ">7.1", "php": ">7.1",
"workerman/workerman": "^4.1", "workerman/workerman": "^5.0|^4.1",
"zoujingli/think-install": "^1.0|@dev", "zoujingli/think-install": "^1.0|@dev",
"zoujingli/think-library": "^6.1|@dev" "zoujingli/think-library": "^6.1|@dev"
}, },

View File

@ -90,9 +90,9 @@ class HttpServer extends Server
Session::$secure = $this->app->config->get('cookie.secure', false); Session::$secure = $this->app->config->get('cookie.secure', false);
Session::$httpOnly = $this->app->config->get('cookie.httponly', true); Session::$httpOnly = $this->app->config->get('cookie.httponly', true);
Session::$sameSite = $this->app->config->get('cookie.samesite', ''); Session::$sameSite = $this->app->config->get('cookie.samesite', '');
Session::$lifetime = $this->app->config->get('session.expire', 7200); Session::$lifetime = intval($this->app->config->get('session.expire', 7200));
Session::$cookiePath = $this->app->config->get('cookie.path', '/'); Session::$cookiePath = $this->app->config->get('cookie.path', '/');
Session::$cookieLifetime = $this->app->config->get('cookie.expire', 0); Session::$cookieLifetime = intval($this->app->config->get('cookie.expire', 0));
} }
/** /**