Skip to content

Commit

Permalink
Fix PHP 8.4 "Implicitly marking parameter as nullable is deprecated" (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dakujem authored Feb 14, 2025
1 parent 744f6f8 commit f3f5450
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
php-versions: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]
dependency-versions: ["highest", "lowest"]
runs-on: ${{ matrix.operating-system }}
steps:
Expand All @@ -31,3 +31,4 @@ jobs:
run: make static
- name: Upload coverage
uses: codecov/codecov-action@v1

4 changes: 2 additions & 2 deletions src/CorsMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ private function error(callable $error): void
* Set the PSR-3 logger.
* @phpstan-ignore method.unused
*/
private function logger(LoggerInterface $logger = null): void
private function logger(?LoggerInterface $logger = null): void
{
$this->logger = $logger;
}
Expand All @@ -389,7 +389,7 @@ private function logger(LoggerInterface $logger = null): void
private function processError(
ServerRequestInterface $request,
ResponseInterface $response,
array $arguments = null
?array $arguments = null
): ResponseInterface {
if (is_callable($this->options["error"])) {
$handler_response = $this->options["error"]($request, $response, $arguments);
Expand Down

0 comments on commit f3f5450

Please sign in to comment.