From ed9e6ad6fa1c62a2d4226092c316dfcbf689a494 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Wed, 30 Jul 2025 16:59:03 +0200 Subject: [PATCH] fix php 8.4 deprecations --- CHANGELOG.md | 6 ++++++ src/Manager/Native.php | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a80c27e..8f6247b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Fixed + +- PHP `8.4` deprecations + ## 4.0.0 - 2023-10-22 ### Changed diff --git a/src/Manager/Native.php b/src/Manager/Native.php index 2686d76..0f2e6c9 100644 --- a/src/Manager/Native.php +++ b/src/Manager/Native.php @@ -24,23 +24,23 @@ final class Native implements Manager { - private ?Session\Id $session = null; + private ?Id $session = null; - private function __construct(Path $save = null) + private function __construct(?Path $save = null) { if ($save instanceof Path) { $_ = \session_save_path($save->toString()); } } - public static function of(Path $save = null): self + public static function of(?Path $save = null): self { return new self($save); } public function start(ServerRequest $request): Maybe { - if ($this->session instanceof Session\Id) { + if ($this->session instanceof Id) { /** @var Maybe */ return Maybe::nothing(); }