Skip to content

Commit ba7eba8

Browse files
committed
unification of Response and IResponse params (BC break)
1 parent 8d50cb4 commit ba7eba8

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
{
@@ -358,6 +357,11 @@ function setHeader(string $name, string $value): static;
358357
*/
359358
function addHeader(string $name, string $value): static;
360359

360+
/**
361+
* Deletes a previously sent HTTP header.
362+
*/
363+
function deleteHeader(string $name): static;
364+
361365
/**
362366
* Sends a Content-type HTTP header.
363367
*/
@@ -394,11 +398,12 @@ function getHeaders(): array;
394398
function setCookie(
395399
string $name,
396400
string $value,
397-
?int $expire,
401+
string|int|null $expire,
398402
?string $path = null,
399403
?string $domain = null,
400404
bool $secure = false,
401405
bool $httpOnly = true,
406+
string $sameSite = self::SAME_SITE_LAX,
402407
): static;
403408

404409
/**

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)