From 46ee454f6854782fc31cdeff06b7c631bc5a910e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20Viemero=CC=88?= Date: Tue, 29 Apr 2025 17:53:45 +0300 Subject: [PATCH] Fix PHP 8.4 deprecation errors Remove type declarations for parameters that are nullable to get rid of deprecation errors in a backwards compatible way. --- Puc/v5p5/StateStore.php | 2 +- Puc/v5p5/UpdateChecker.php | 2 +- vendor/ParsedownModern.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Puc/v5p5/StateStore.php b/Puc/v5p5/StateStore.php index b3dac76..2989c3a 100644 --- a/Puc/v5p5/StateStore.php +++ b/Puc/v5p5/StateStore.php @@ -77,7 +77,7 @@ if ( !class_exists(StateStore::class, false) ): * @param Update|null $update * @return $this */ - public function setUpdate(Update $update = null) { + public function setUpdate($update = null) { $this->lazyLoad(); $this->update = $update; return $this; diff --git a/Puc/v5p5/UpdateChecker.php b/Puc/v5p5/UpdateChecker.php index af5dcd5..cd3290e 100644 --- a/Puc/v5p5/UpdateChecker.php +++ b/Puc/v5p5/UpdateChecker.php @@ -459,7 +459,7 @@ if ( !class_exists(UpdateChecker::class, false) ): * * @param Metadata|null $update */ - protected function fixSupportedWordpressVersion(Metadata $update = null) { + protected function fixSupportedWordpressVersion($update = null) { if ( !isset($update->tested) || !preg_match('/^\d++\.\d++$/', $update->tested) ) { return; } diff --git a/vendor/ParsedownModern.php b/vendor/ParsedownModern.php index 5d96071..c48bfc9 100644 --- a/vendor/ParsedownModern.php +++ b/vendor/ParsedownModern.php @@ -648,7 +648,7 @@ class Parsedown # # Setext - protected function blockSetextHeader($Line, array $Block = null) + protected function blockSetextHeader($Line, $Block = null) { if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) { @@ -786,7 +786,7 @@ class Parsedown # # Table - protected function blockTable($Line, array $Block = null) + protected function blockTable($Line, $Block = null) { if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) {