From c6e74d9fcc601823ab3d407e35f9d09fafd9689d Mon Sep 17 00:00:00 2001 From: Clifford Vickrey Date: Wed, 23 Oct 2024 11:13:18 -0400 Subject: [PATCH] add updates for PHP 8.4 --- composer.json | 2 +- src/CSPBuilder.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 51f239e..bb1dd8d 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "require": { "php": "^7.4|^8", "ext-json": "*", - "paragonie/constant_time_encoding": "^2", + "paragonie/constant_time_encoding": "^2|^3", "psr/http-message": "^1|^2", "opis/json-schema": "^2.3" }, diff --git a/src/CSPBuilder.php b/src/CSPBuilder.php index 544121d..852b57f 100644 --- a/src/CSPBuilder.php +++ b/src/CSPBuilder.php @@ -686,7 +686,7 @@ public function requireSRIFor(string $directive): self public function saveSnippet( string $outputFile, string $format = self::FORMAT_NGINX, - callable $hookBeforeSave = null + ?callable $hookBeforeSave = null ): bool { if ($this->needsCompile) { $this->compile();