diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7fa0ea1..420cb9b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,8 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" + - "8.4" steps: - name: Checkout. diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3e79b31..0d90f64 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -35,6 +35,7 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" steps: - name: Checkout. diff --git a/src/Route.php b/src/Route.php index 546adc8..3790eea 100644 --- a/src/Route.php +++ b/src/Route.php @@ -337,7 +337,7 @@ public function path(array $parameters = []): string * @throws InvalidRouteParameterException If the host or the parameter value does not match its regexp. * @psalm-suppress PossiblyNullArgument */ - public function url(array $parameters = [], string $host = null, bool $secure = null): string + public function url(array $parameters = [], ?string $host = null, ?bool $secure = null): string { $path = $this->path($parameters); $host = $host ? trim($host, '/') : null; diff --git a/src/RouteCollection.php b/src/RouteCollection.php index 6e4c56c..b8ca92b 100644 --- a/src/RouteCollection.php +++ b/src/RouteCollection.php @@ -135,7 +135,7 @@ public function path(string $name, array $parameters = []): string /** * {@inheritDoc} */ - public function url(string $name, array $parameters = [], string $host = null, bool $secure = null): string + public function url(string $name, array $parameters = [], ?string $host = null, ?bool $secure = null): string { $route = $this->get($name); return $route->url($parameters, $host, $secure); diff --git a/src/RouteCollectionInterface.php b/src/RouteCollectionInterface.php index 688daa6..b0e587c 100644 --- a/src/RouteCollectionInterface.php +++ b/src/RouteCollectionInterface.php @@ -90,5 +90,5 @@ public function path(string $name, array $parameters = []): string; * @return string URL generated. * @throws RouteNotFoundException if the route does not exist. */ - public function url(string $name, array $parameters = [], string $host = null, bool $secure = null): string; + public function url(string $name, array $parameters = [], ?string $host = null, ?bool $secure = null): string; } diff --git a/src/RouteCollector.php b/src/RouteCollector.php index 8f52233..f781994 100644 --- a/src/RouteCollector.php +++ b/src/RouteCollector.php @@ -19,7 +19,7 @@ final class RouteCollector /** * @param RouteCollectionInterface|null $routes */ - public function __construct(RouteCollectionInterface $routes = null) + public function __construct(?RouteCollectionInterface $routes = null) { $this->routes = $routes ?? new RouteCollection(); }