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

Fix PHP 8.4 deprecations #106

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Fix PHP 8.4 deprecations and add nullable type declaration for defaul…
…t null value
  • Loading branch information
ejunker committed Dec 12, 2024
commit c4169a7806887654904c03e5e11d1f437342e067
2 changes: 1 addition & 1 deletion src/Exceptions/CannotFindModuleForPathException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class CannotFindModuleForPathException extends Exception
{
public function __construct(string $path, Throwable $previous = null)
public function __construct(string $path, ?Throwable $previous = null)
{
parent::__construct("Unable to determine module for '{$path}'", 0, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Support/ModuleConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function fromComposerFile(SplFileInfo $composer_file): self
public function __construct(
public string $name,
public string $base_path,
Collection $namespaces = null
?Collection $namespaces = null
) {
$this->namespaces = $namespaces ?? new Collection();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Support/ModuleRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getCachePath(): string
return $this->cache_path;
}

public function module(string $name = null): ?ModuleConfig
public function module(?string $name = null): ?ModuleConfig
{
// We want to allow for gracefully handling empty/null names
return $name
Expand Down
Loading