From 0a1cd6e371da21b99a8f1765ade2a9c391ee8622 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 28 Nov 2024 14:02:33 +1300 Subject: [PATCH 1/2] API Explicity mark nullable paramters for PHP 8.4 --- src/Model/BlogPostFilter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/BlogPostFilter.php b/src/Model/BlogPostFilter.php index e76635f1..8ca03a03 100644 --- a/src/Model/BlogPostFilter.php +++ b/src/Model/BlogPostFilter.php @@ -27,7 +27,7 @@ class BlogPostFilter extends Extension * @param SQLSelect $query * @param DataQuery $query */ - protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, ?DataQuery $dataQuery = null) { if (Controller::has_curr() && Controller::curr() instanceof LeftAndMain) { @@ -60,7 +60,7 @@ protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) * @param DataQuery $dataQuery * @param DataObject $dataObject */ - protected function augmentLoadLazyFields(SQLSelect &$query, DataQuery &$dataQuery = null, $dataObject) + protected function augmentLoadLazyFields(SQLSelect &$query, ?DataQuery &$dataQuery = null, $dataObject) { $blogPostTable = DataObject::getSchema()->tableName(BlogPost::class); $dataQuery->innerJoin( From 9bae522c26a7dd8910a3bc03600c50aa4f8f5490 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Sun, 1 Dec 2024 20:18:17 +1300 Subject: [PATCH 2/2] API Make parameter non-optional for PHP 8.4 --- src/Model/BlogPostFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/BlogPostFilter.php b/src/Model/BlogPostFilter.php index 8ca03a03..12346f31 100644 --- a/src/Model/BlogPostFilter.php +++ b/src/Model/BlogPostFilter.php @@ -60,7 +60,7 @@ protected function augmentSQL(SQLSelect $query, ?DataQuery $dataQuery = null) * @param DataQuery $dataQuery * @param DataObject $dataObject */ - protected function augmentLoadLazyFields(SQLSelect &$query, ?DataQuery &$dataQuery = null, $dataObject) + protected function augmentLoadLazyFields(SQLSelect &$query, ?DataQuery &$dataQuery, $dataObject) { $blogPostTable = DataObject::getSchema()->tableName(BlogPost::class); $dataQuery->innerJoin(