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

## 5.2.3 - 2024-09-18

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions src/Server/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function withArgument(string $value): self
/**
* @param non-empty-string $key
*/
public function withOption(string $key, string $value = null): self
public function withOption(string $key, ?string $value = null): self
{
$self = clone $this;
$self->parameters = ($this->parameters)(Option::long($key, $value));
Expand All @@ -113,7 +113,7 @@ public function withOption(string $key, string $value = null): self
/**
* @param non-empty-string $key
*/
public function withShortOption(string $key, string $value = null): self
public function withShortOption(string $key, ?string $value = null): self
{
$self = clone $this;
$self->parameters = ($this->parameters)(Option::short($key, $value));
Expand Down
6 changes: 3 additions & 3 deletions src/Server/Command/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class Option implements Parameter
/**
* @param non-empty-string $key
*/
private function __construct(bool $long, string $key, string $value = null)
private function __construct(bool $long, string $key, ?string $value = null)
{
$this->long = $long;
$this->key = $key;
Expand All @@ -28,7 +28,7 @@ private function __construct(bool $long, string $key, string $value = null)
* @psalm-pure
* @param non-empty-string $key
*/
public static function long(string $key, string $value = null): self
public static function long(string $key, ?string $value = null): self
{
return new self(true, $key, $value);
}
Expand All @@ -37,7 +37,7 @@ public static function long(string $key, string $value = null): self
* @psalm-pure
* @param non-empty-string $key
*/
public static function short(string $key, string $value = null): self
public static function short(string $key, ?string $value = null): self
{
return new self(false, $key, $value);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Server/Processes/Remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
Processes $processes,
User $user,
Host $host,
Port $port = null,
?Port $port = null,
) {
$this->processes = $processes;
$command = Command::foreground('ssh');
Expand Down
2 changes: 1 addition & 1 deletion src/Server/Processes/Unix.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static function of(
Clock $clock,
Capabilities $capabilities,
Halt $halt,
Period $grace = null,
?Period $grace = null,
): self {
return new self(
$clock,
Expand Down
2 changes: 1 addition & 1 deletion src/ServerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function build(
Clock $clock,
Capabilities $capabilities,
Halt $halt,
Period $grace = null,
?Period $grace = null,
): Server {
switch (\PHP_OS) {
case 'Darwin':
Expand Down
2 changes: 1 addition & 1 deletion src/Servers/Remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(
Server $server,
User $user,
Host $host,
Port $port = null,
?Port $port = null,
) {
$this->processes = new Processes\Remote(
$server->processes(),
Expand Down
4 changes: 2 additions & 2 deletions src/Servers/Unix.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private function __construct(
Clock $clock,
Capabilities $capabilities,
Halt $halt,
Period $grace = null,
?Period $grace = null,
) {
$this->processes = Processes\Unix::of(
$clock,
Expand All @@ -40,7 +40,7 @@ public static function of(
Clock $clock,
Capabilities $capabilities,
Halt $halt,
Period $grace = null,
?Period $grace = null,
): self {
return new self($clock, $capabilities, $halt, $grace);
}
Expand Down