Skip to content

Commit b0a84c0

Browse files
committed
unification of Response and IResponse params (BC break)
1 parent 6650b32 commit b0a84c0

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/Http/IResponse.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
/**
1414
* HTTP response interface.
15-
* @method self deleteHeader(string $name)
1615
*/
1716
interface IResponse
1817
{
@@ -167,6 +166,11 @@ function setHeader(string $name, string $value): static;
167166
*/
168167
function addHeader(string $name, string $value): static;
169168

169+
/**
170+
* Deletes a previously sent HTTP header.
171+
*/
172+
function deleteHeader(string $name): static;
173+
170174
/**
171175
* Sends a Content-type HTTP header.
172176
*/
@@ -203,11 +207,12 @@ function getHeaders(): array;
203207
function setCookie(
204208
string $name,
205209
string $value,
206-
?int $expire,
210+
string|int|null $expire,
207211
?string $path = null,
208212
?string $domain = null,
209213
bool $secure = false,
210214
bool $httpOnly = true,
215+
string $sameSite = self::SAME_SITE_LAX,
211216
): static;
212217

213218
/**

src/Http/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public function __destruct()
246246
public function setCookie(
247247
string $name,
248248
string $value,
249-
string|int|\DateTimeInterface|null $expire,
249+
string|int|null $expire,
250250
?string $path = null,
251251
?string $domain = null,
252252
?bool $secure = null,

0 commit comments

Comments
 (0)