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
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

## 4.4.0 - 2024-03-10

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Continuation.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private function __construct(
Client $client,
mixed $carry,
bool $closed = false,
Message $response = null,
?Message $response = null,
bool $stop = false,
) {
$this->client = $client;
Expand Down
4 changes: 2 additions & 2 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ final class Factory
{
public static function build(
OperatingSystem $os,
Path $sockets = null,
ElapsedPeriod $heartbeat = null,
?Path $sockets = null,
?ElapsedPeriod $heartbeat = null,
): IPC {
$sockets ??= $os->status()->tmp()->resolve(Path::of('innmind/ipc/'));
$heartbeat ??= new ElapsedPeriod(1000); // default to 1 second
Expand Down
4 changes: 2 additions & 2 deletions src/IPC.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public function exist(Process\Name $name): bool;
/**
* @return Maybe<Process>
*/
public function wait(Process\Name $name, ElapsedPeriod $timeout = null): Maybe;
public function listen(Process\Name $self, ElapsedPeriod $timeout = null): Server;
public function wait(Process\Name $name, ?ElapsedPeriod $timeout = null): Maybe;
public function listen(Process\Name $self, ?ElapsedPeriod $timeout = null): Server;
}
4 changes: 2 additions & 2 deletions src/IPC/Unix.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function exist(Process\Name $name): bool
return $this->filesystem->contains(FileName::of("{$name->toString()}.sock"));
}

public function wait(Process\Name $name, ElapsedPeriod $timeout = null): Maybe
public function wait(Process\Name $name, ?ElapsedPeriod $timeout = null): Maybe
{
$start = $this->clock->now();

Expand All @@ -118,7 +118,7 @@ public function wait(Process\Name $name, ElapsedPeriod $timeout = null): Maybe
return $this->get($name);
}

public function listen(Process\Name $self, ElapsedPeriod $timeout = null): Server
public function listen(Process\Name $self, ?ElapsedPeriod $timeout = null): Server
{
return new Server\Unix(
$this->sockets,
Expand Down
2 changes: 1 addition & 1 deletion src/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function send(Sequence $messages): Maybe;
/**
* @return Maybe<Message>
*/
public function wait(ElapsedPeriod $timeout = null): Maybe;
public function wait(?ElapsedPeriod $timeout = null): Maybe;

/**
* @return Maybe<SideEffect> Returns nothing when couldn't close the connection properly
Expand Down
4 changes: 2 additions & 2 deletions src/Process/Unix.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function send(Sequence $messages): Maybe
);
}

public function wait(ElapsedPeriod $timeout = null): Maybe
public function wait(?ElapsedPeriod $timeout = null): Maybe
{
do {
if ($this->closed()) {
Expand Down Expand Up @@ -209,7 +209,7 @@ private function cut(): Maybe
return $this->socket->close()->maybe();
}

private function timedout(ElapsedPeriod $timeout = null): bool
private function timedout(?ElapsedPeriod $timeout = null): bool
{
if ($timeout === null) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/Server/Unix.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(
Signals $signals,
Address $address,
ElapsedPeriod $heartbeat,
ElapsedPeriod $timeout = null,
?ElapsedPeriod $timeout = null,
) {
$this->sockets = $sockets;
$this->protocol = $protocol;
Expand Down
Loading