From 77d508d1d91f9894a9d7b2384bf832a70197752a Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 23 Jan 2024 15:32:00 +0100 Subject: [PATCH] Merge branch '5.4' into 6.3 * 5.4: Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value [Messenger][AmazonSqs] Allow async-aws/sqs version 2 --- HtmlSanitizer.php | 2 +- TextSanitizer/UrlSanitizer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HtmlSanitizer.php b/HtmlSanitizer.php index fb66892..ddc61c3 100644 --- a/HtmlSanitizer.php +++ b/HtmlSanitizer.php @@ -30,7 +30,7 @@ final class HtmlSanitizer implements HtmlSanitizerInterface */ private array $domVisitors = []; - public function __construct(HtmlSanitizerConfig $config, ParserInterface $parser = null) + public function __construct(HtmlSanitizerConfig $config, ?ParserInterface $parser = null) { $this->config = $config; $this->parser = $parser ?? new MastermindsParser(); diff --git a/TextSanitizer/UrlSanitizer.php b/TextSanitizer/UrlSanitizer.php index c4643f7..a806981 100644 --- a/TextSanitizer/UrlSanitizer.php +++ b/TextSanitizer/UrlSanitizer.php @@ -29,7 +29,7 @@ final class UrlSanitizer * * It also transforms the URL to HTTPS if requested. */ - public static function sanitize(?string $input, array $allowedSchemes = null, bool $forceHttps = false, array $allowedHosts = null, bool $allowRelative = false): ?string + public static function sanitize(?string $input, ?array $allowedSchemes = null, bool $forceHttps = false, ?array $allowedHosts = null, bool $allowRelative = false): ?string { if (!$input) { return null;