Skip to content

Commit e822afb

Browse files
committed
Fix for PHP 8.4
1 parent 460ee40 commit e822afb

File tree

6 files changed

+7
-4
lines changed

6 files changed

+7
-4
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
- "8.0"
4040
- "8.1"
4141
- "8.2"
42+
- "8.3"
43+
- "8.4"
4244

4345
steps:
4446
- name: Checkout.

.github/workflows/static.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- "8.0"
3636
- "8.1"
3737
- "8.2"
38+
- "8.3"
3839

3940
steps:
4041
- name: Checkout.

src/Route.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public function path(array $parameters = []): string
337337
* @throws InvalidRouteParameterException If the host or the parameter value does not match its regexp.
338338
* @psalm-suppress PossiblyNullArgument
339339
*/
340-
public function url(array $parameters = [], string $host = null, bool $secure = null): string
340+
public function url(array $parameters = [], ?string $host = null, ?bool $secure = null): string
341341
{
342342
$path = $this->path($parameters);
343343
$host = $host ? trim($host, '/') : null;

src/RouteCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function path(string $name, array $parameters = []): string
135135
/**
136136
* {@inheritDoc}
137137
*/
138-
public function url(string $name, array $parameters = [], string $host = null, bool $secure = null): string
138+
public function url(string $name, array $parameters = [], ?string $host = null, ?bool $secure = null): string
139139
{
140140
$route = $this->get($name);
141141
return $route->url($parameters, $host, $secure);

src/RouteCollectionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ public function path(string $name, array $parameters = []): string;
9090
* @return string URL generated.
9191
* @throws RouteNotFoundException if the route does not exist.
9292
*/
93-
public function url(string $name, array $parameters = [], string $host = null, bool $secure = null): string;
93+
public function url(string $name, array $parameters = [], ?string $host = null, ?bool $secure = null): string;
9494
}

src/RouteCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class RouteCollector
1919
/**
2020
* @param RouteCollectionInterface|null $routes
2121
*/
22-
public function __construct(RouteCollectionInterface $routes = null)
22+
public function __construct(?RouteCollectionInterface $routes = null)
2323
{
2424
$this->routes = $routes ?? new RouteCollection();
2525
}

0 commit comments

Comments
 (0)