Skip to content

Commit ab00bb5

Browse files
committed
unification of Response and IResponse params (BC break)
1 parent 013127c commit ab00bb5

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
{
@@ -355,6 +354,11 @@ function setHeader(string $name, string $value): static;
355354
*/
356355
function addHeader(string $name, string $value): static;
357356

357+
/**
358+
* Deletes a previously sent HTTP header.
359+
*/
360+
function deleteHeader(string $name): static;
361+
358362
/**
359363
* Sends a Content-type HTTP header.
360364
*/
@@ -391,11 +395,12 @@ function getHeaders(): array;
391395
function setCookie(
392396
string $name,
393397
string $value,
394-
?int $expire,
398+
string|int|null $expire,
395399
?string $path = null,
396400
?string $domain = null,
397401
bool $secure = false,
398402
bool $httpOnly = true,
403+
string $sameSite = self::SAME_SITE_LAX,
399404
): static;
400405

401406
/**

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)