Allow PHP-8.2 and up Compatibility instead of just PHP-8.4

This commit is contained in:
johnnyq
2026-06-12 17:06:10 -04:00
parent 2204bd52f4
commit d3a93652f3
220 changed files with 7198 additions and 2635 deletions

View File

@@ -115,6 +115,14 @@ class Uri implements Htmlable, JsonSerializable, Responsable, Stringable
return new static(call_user_func(static::$urlGeneratorResolver)->action($action, $parameters, $absolute));
}
/**
* Get the URI's authority.
*/
public function authority(): ?string
{
return $this->uri->getAuthority();
}
/**
* Get the URI's scheme.
*/
@@ -161,8 +169,10 @@ class Uri implements Htmlable, JsonSerializable, Responsable, Stringable
* Get the URI's path.
*
* Empty or missing paths are returned as a single "/".
*
* @return non-empty-string
*/
public function path(): ?string
public function path(): string
{
$path = trim((string) $this->uri->getPath(), '/');