diff --git a/CHANGELOG.md b/CHANGELOG.md index 167b9b8..c14ca1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Fixed + +- PHP `8.4` deprecations + ## 5.2.0 - 2024-07-14 ### Changed diff --git a/src/Factory.php b/src/Factory.php index e3973b2..932ea38 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -5,7 +5,7 @@ final class Factory { - public static function build(Config $config = null): OperatingSystem + public static function build(?Config $config = null): OperatingSystem { switch (\PHP_OS) { case 'Darwin': diff --git a/src/OperatingSystem/Unix.php b/src/OperatingSystem/Unix.php index fcc5768..e646d0b 100644 --- a/src/OperatingSystem/Unix.php +++ b/src/OperatingSystem/Unix.php @@ -38,7 +38,7 @@ private function __construct(Config $config) $this->config = $config; } - public static function of(Config $config = null): self + public static function of(?Config $config = null): self { return new self($config ?? Config::of()); } diff --git a/src/Sockets.php b/src/Sockets.php index 3d9ffa2..44b045a 100644 --- a/src/Sockets.php +++ b/src/Sockets.php @@ -32,5 +32,5 @@ public function takeOver(Unix $address): Maybe; * @return Maybe */ public function connectTo(Unix $address): Maybe; - public function watch(ElapsedPeriod $timeout = null): Watch; + public function watch(?ElapsedPeriod $timeout = null): Watch; } diff --git a/src/Sockets/Logger.php b/src/Sockets/Logger.php index 4ce3a25..29b0fdb 100644 --- a/src/Sockets/Logger.php +++ b/src/Sockets/Logger.php @@ -56,7 +56,7 @@ public function connectTo(Address $address): Maybe return $this->sockets->connectTo($address); } - public function watch(ElapsedPeriod $timeout = null): Watch + public function watch(?ElapsedPeriod $timeout = null): Watch { return Watch\Logger::psr( $this->sockets->watch($timeout), diff --git a/src/Sockets/Unix.php b/src/Sockets/Unix.php index 3b29b63..0f701a8 100644 --- a/src/Sockets/Unix.php +++ b/src/Sockets/Unix.php @@ -54,7 +54,7 @@ public function connectTo(Address $address): Maybe ); } - public function watch(ElapsedPeriod $timeout = null): Watch + public function watch(?ElapsedPeriod $timeout = null): Watch { if (\is_null($timeout)) { return $this