Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/FileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ public function open(string $savePath, string $name):bool {
return $success;
}

/**
* @link http://php.net/manual/en/sessionhandlerinterface.close.php
*/
/** @link http://php.net/manual/en/sessionhandlerinterface.close.php */
public function close():bool {
return true;
}
Expand Down
10 changes: 4 additions & 6 deletions src/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Session implements SessionContainer, TypeSafeGetter {
const DEFAULT_SESSION_SECURE = true;
const DEFAULT_SESSION_HTTPONLY = true;
const DEFAULT_COOKIE_PATH = "/";
const DEFAULT_COOKIE_SAMESITE = "Strict";
const DEFAULT_COOKIE_SAMESITE = "Lax";
const DEFAULT_STRICT_MODE = true;
const DEFAULT_SESSION_ID_LENGTH = 64;
const DEFAULT_SESSION_ID_BITS_PER_CHARACTER = 5;
Expand All @@ -29,7 +29,7 @@ class Session implements SessionContainer, TypeSafeGetter {
public function __construct(
SessionHandlerInterface $sessionHandler,
array|ArrayAccess $config = [],
string $id = null
string $id = null,
) {
$this->sessionHandler = $sessionHandler;

Expand Down Expand Up @@ -137,14 +137,12 @@ public function write():bool {

/** @param ArrayAccess<string, string>|array<string, string> $config */
private function setIniDefaults(ArrayAccess|array $config):void {
// phpcs:ignore
@ini_set(
ini_set(
"session.sid_length",
$config["sid_length"]
?? self::DEFAULT_SESSION_ID_LENGTH
);
// phpcs:ignore
@ini_set(
ini_set(
"session.sid_bits_per_character",
$config["sid_bits_per_character"]
?? (string)self::DEFAULT_SESSION_ID_BITS_PER_CHARACTER
Expand Down