Skip to content

Commit 9f71f10

Browse files
committed
session更新到3.0
1 parent cbd9a40 commit 9f71f10

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
],
1818
"require": {
1919
"php": ">=7.0.0",
20-
"mix/http-message": "~2.2.0",
21-
"mix/redis": "~2.2.0"
20+
"mix/http-message": "^3.0",
21+
"mix/redis": "^3.0"
2222
},
2323
"autoload": {
2424
"psr-4": {

src/Session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function set(string $name, $value)
158158
->withPath($this->cookiePath)
159159
->withSecure($this->cookieSecure)
160160
->withHttpOnly($this->cookieHttpOnly);
161-
$this->response->withCookie($cookie);
161+
$this->response->withAddedCookie($cookie);
162162
return true;
163163
}
164164

@@ -179,7 +179,7 @@ public function get(string $name, $default = null)
179179
->withPath($this->cookiePath)
180180
->withSecure($this->cookieSecure)
181181
->withHttpOnly($this->cookieHttpOnly);
182-
$this->response->withCookie($cookie);
182+
$this->response->withAddedCookie($cookie);
183183
// 返回值
184184
return $this->handler->get($this->getId(), $name, $default);
185185
}

0 commit comments

Comments
 (0)