Skip to content

Fix PHP 8.4 deprecations #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 17, 2025
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [Unreleased]

### Fixed

- PHP `8.4` deprecations

## 5.2.0 - 2024-07-14

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
2 changes: 1 addition & 1 deletion src/OperatingSystem/Unix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Sockets.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ public function takeOver(Unix $address): Maybe;
* @return Maybe<Client>
*/
public function connectTo(Unix $address): Maybe;
public function watch(ElapsedPeriod $timeout = null): Watch;
public function watch(?ElapsedPeriod $timeout = null): Watch;
}
2 changes: 1 addition & 1 deletion src/Sockets/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Sockets/Unix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down