Skip to content

Commit 08b7cdb

Browse files
committed
[BrowserKit] Allow Cookie expiration to be an int
1 parent 291a54c commit 08b7cdb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Symfony/Component/BrowserKit/Cookie.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ class Cookie
4848
/**
4949
* Sets a cookie.
5050
*
51-
* @param string $name The cookie name
52-
* @param string|null $value The value of the cookie
53-
* @param string|null $expires The time the cookie expires
54-
* @param string|null $path The path on the server in which the cookie will be available on
55-
* @param string $domain The domain that the cookie is available
56-
* @param bool $secure Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client
57-
* @param bool $httponly The cookie httponly flag
58-
* @param bool $encodedValue Whether the value is encoded or not
59-
* @param string|null $samesite The cookie samesite attribute
51+
* @param string $name The cookie name
52+
* @param string|null $value The value of the cookie
53+
* @param string|int|null $expires The time the cookie expires
54+
* @param string|null $path The path on the server in which the cookie will be available on
55+
* @param string $domain The domain that the cookie is available
56+
* @param bool $secure Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client
57+
* @param bool $httponly The cookie httponly flag
58+
* @param bool $encodedValue Whether the value is encoded or not
59+
* @param string|null $samesite The cookie samesite attribute
6060
*/
61-
public function __construct(string $name, ?string $value, ?string $expires = null, ?string $path = null, string $domain = '', bool $secure = false, bool $httponly = true, bool $encodedValue = false, ?string $samesite = null)
61+
public function __construct(string $name, ?string $value, string|int|null $expires = null, ?string $path = null, string $domain = '', bool $secure = false, bool $httponly = true, bool $encodedValue = false, ?string $samesite = null)
6262
{
6363
if ($encodedValue) {
6464
$this->rawValue = $value ?? '';

0 commit comments

Comments
 (0)