Skip to content
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

PHP 8.4 compatibility: implicitly nullable parameter declarations deprecated #80

Merged
merged 1 commit into from
Jul 23, 2024
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
2 changes: 1 addition & 1 deletion src/ProcessBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function setLogger($logger)
/**
* @inheritDoc
*/
public function start(callable $callback = null, array $env = []): void
public function start(?callable $callback = null, array $env = []): void
{
$cmd = $this->getCommandLine();
if ($this->isSimulated()) {
Expand Down
4 changes: 2 additions & 2 deletions src/ProcessManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function siteProcess(SiteAliasInterface $siteAlias, $args = [], $options
* @param int|float|null $timeout The timeout in seconds or null to disable
* @return Process
*/
public function process($command, $cwd = null, array $env = null, $input = null, $timeout = 60)
public function process($command, $cwd = null, ?array $env = null, $input = null, $timeout = 60)
{
return new ProcessBase($command, $cwd, $env, $input, $timeout);
}
Expand All @@ -117,7 +117,7 @@ public function process($command, $cwd = null, array $env = null, $input = null,
* @param int|float|null $timeout The timeout in seconds or null to disable
* @return Process
*/
public function shell($command, $cwd = null, array $env = null, $input = null, $timeout = 60)
public function shell($command, $cwd = null, ?array $env = null, $input = null, $timeout = 60)
{
return ProcessBase::fromShellCommandline($command, $cwd, $env, $input, $timeout);
}
Expand Down
6 changes: 3 additions & 3 deletions src/SiteProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@ public function getCommandLine(): string
/**
* @inheritDoc
*/
public function start(callable $callback = null, array $env = []): void
public function start(?callable $callback = null, array $env = []): void
{
$cmd = $this->getCommandLine();
parent::start($callback, $env);
}

public function mustRun(callable $callback = null, array $env = []): static
public function mustRun(?callable $callback = null, array $env = []): static
{
if (0 !== $this->run($callback, $env)) {
// Be less verbose when there is nothing in stdout or stderr.
Expand All @@ -220,7 +220,7 @@ public function mustRun(callable $callback = null, array $env = []): static
/**
* @inheritDoc
*/
public function wait(callable $callback = null): int
public function wait(?callable $callback = null): int
{
$return = parent::wait($callback);
return $return;
Expand Down
Loading