Skip to content

Commit d372249

Browse files
committed
removed support for PHP 7
1 parent 1b8d9b9 commit d372249

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

src/Http/Response.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -273,19 +273,7 @@ public function setCookie(
273273
'httponly' => $httpOnly ?? true,
274274
'samesite' => $sameSite = ($sameSite ?? self::SAME_SITE_LAX),
275275
];
276-
if (PHP_VERSION_ID >= 70300) {
277-
setcookie($name, $value, $options);
278-
} else {
279-
setcookie(
280-
$name,
281-
$value,
282-
$options['expires'],
283-
$options['path'] . ($sameSite ? "; SameSite=$sameSite" : ''),
284-
$options['domain'],
285-
$options['secure'],
286-
$options['httponly'],
287-
);
288-
}
276+
setcookie($name, $value, $options);
289277
return $this;
290278
}
291279

src/Http/Session.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -403,17 +403,7 @@ private function configure(array $config): void
403403
}
404404

405405
if ($cookie !== $origCookie) {
406-
if (PHP_VERSION_ID >= 70300) {
407-
@session_set_cookie_params($cookie); // @ may trigger warning when session is active since PHP 7.2
408-
} else {
409-
@session_set_cookie_params( // @ may trigger warning when session is active since PHP 7.2
410-
$cookie['lifetime'],
411-
$cookie['path'] . (isset($cookie['samesite']) ? '; SameSite=' . $cookie['samesite'] : ''),
412-
$cookie['domain'],
413-
$cookie['secure'],
414-
$cookie['httponly'],
415-
);
416-
}
406+
@session_set_cookie_params($cookie); // @ may trigger warning when session is active since PHP 7.2
417407
if (session_status() === PHP_SESSION_ACTIVE) {
418408
$this->sendCookie();
419409
}

0 commit comments

Comments
 (0)