Skip to content

Commit

Permalink
removed deprecation notices on core code to support PHP 8.4 runtime (…
Browse files Browse the repository at this point in the history
…see gh#215)
  • Loading branch information
llaville committed Oct 31, 2024
1 parent 50b4077 commit e39a262
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class Cache
private int $hits = 0;
private int $misses = 0;

public function __construct(string|object $cachePoolAdapter = null)
public function __construct(string|object|null $cachePoolAdapter = null)
{
if (null === $cachePoolAdapter) {
$adapter = new ArrayAdapter();
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct()
parent::__construct(self::NAME, self::getPrettyVersion());
}

public function run(InputInterface $input = null, OutputInterface $output = null): int
public function run(?InputInterface $input = null, ?OutputInterface $output = null): int
{
$output ??= new ConsoleOutput(STDOUT);

Expand Down
2 changes: 1 addition & 1 deletion src/Event/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(iterable $extensions)
}
}

public function dispatch(object $event, string $eventName = null): object
public function dispatch(object $event, ?string $eventName = null): object
{
$triggered = false;

Expand Down
4 changes: 2 additions & 2 deletions src/Helper/ProcessHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getName(): string
public function start(
OutputInterface $output,
Process $process,
callable $callback = null,
?callable $callback = null,
array $env = [],
int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE
): Process {
Expand Down Expand Up @@ -97,7 +97,7 @@ private function wrapCallback(
DebugFormatterHelper $formatter,
OutputInterface $output,
Process $process,
callable $callback = null
?callable $callback = null
): callable {
return function ($type, $buffer) use ($output, $process, $callback, $formatter) {
$output->write(
Expand Down
6 changes: 3 additions & 3 deletions src/Process/LintProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ final class LintProcess extends Process

public function __construct(
array $command,
string $cwd = null,
array $env = null,
?string $cwd = null,
?array $env = null,
mixed $input = null,
?float $timeout = 60
) {
Expand Down Expand Up @@ -158,7 +158,7 @@ public function getItem(SplFileInfo $fileInfo): LintProcessItem
return (self::$createLintProcessItem)($hasError, $errorString, $errorLine, $hasWarning, $warningString, $warningLine, $fileInfo);
}

public function begin(callable $callback = null, array $env = []): void
public function begin(?callable $callback = null, array $env = []): void
{
if ($this->helper instanceof ProcessHelper) {
$this->helper->start($this->output, $this, $callback, $env);
Expand Down

0 comments on commit e39a262

Please sign in to comment.