Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Dec 11, 2024
1 parent ebd9aaa commit 5d2e696
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
],
"require": {
"php": ">=8.1",
"spiral/core": "^3.15",
"spiral/files": "^3.15",
"spiral/cache": "^3.15"
"spiral/core": "^3.14.8",
"spiral/files": "^3.14.8",
"spiral/cache": "^3.14.8"
},
"require-dev": {
"phpunit/phpunit": "^10.1",
Expand Down
4 changes: 2 additions & 2 deletions src/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class Session implements SessionInterface
public function __construct(
private readonly string $clientSignature,
private readonly int $lifetime,
string $id = null
?string $id = null
) {
if (!empty($id) && $this->validID($id)) {
$this->id = $id;
Expand Down Expand Up @@ -158,7 +158,7 @@ public function destroy(): bool
return $this->commit();
}

public function getSection(string $name = null): SessionSectionInterface
public function getSection(?string $name = null): SessionSectionInterface
{
return new SessionSection($this, $name ?? self::DEFAULT_SECTION);
}
Expand Down
2 changes: 1 addition & 1 deletion src/SessionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(
) {
}

public function initSession(string $clientSignature, string $id = null): SessionInterface
public function initSession(string $clientSignature, ?string $id = null): SessionInterface
{
if (\session_status() === PHP_SESSION_ACTIVE) {
throw new MultipleSessionException('Unable to initiate session, session already started');
Expand Down
2 changes: 1 addition & 1 deletion src/SessionFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ interface SessionFactoryInterface
* hardens session transfer.
* @param string|null $id When null - expect php to create session automatically.
*/
public function initSession(string $clientSignature, string $id = null): SessionInterface;
public function initSession(string $clientSignature, ?string $id = null): SessionInterface;
}
2 changes: 1 addition & 1 deletion src/SessionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ public function destroy(): bool;
/**
* @param string|null $name When null default section to be returned.
*/
public function getSection(string $name = null): SessionSectionInterface;
public function getSection(?string $name = null): SessionSectionInterface;
}

0 comments on commit 5d2e696

Please sign in to comment.