From 8339ebadebda39325886c3e151506f7ecfab3655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ng=C3=B4=20Qu=E1=BB=91c=20=C4=90=E1=BA=A1t?= Date: Thu, 26 Oct 2023 21:31:34 +0700 Subject: [PATCH 1/2] fix: fix deprecated dynamic property in php8.2 --- src/Api/AttachForumSerializerAttributes.php | 5 ++++ src/Api/AttatchTagSerializerAttributes.php | 5 ++++ src/Controller/BlogItemController.php | 25 +++++++++++++++++++ .../CreateBlogMetaOnDiscussionCreate.php | 5 ++++ src/Query/FilterDiscussionsForBlogPosts.php | 7 +++++- 5 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/Api/AttachForumSerializerAttributes.php b/src/Api/AttachForumSerializerAttributes.php index df4923f..1eebaeb 100644 --- a/src/Api/AttachForumSerializerAttributes.php +++ b/src/Api/AttachForumSerializerAttributes.php @@ -8,6 +8,11 @@ class AttachForumSerializerAttributes { + /** + * @var SettingsRepositoryInterface + */ + protected $settings; + /** * @param SettingsRepositoryInterface $settings */ diff --git a/src/Api/AttatchTagSerializerAttributes.php b/src/Api/AttatchTagSerializerAttributes.php index 130e882..06a4414 100644 --- a/src/Api/AttatchTagSerializerAttributes.php +++ b/src/Api/AttatchTagSerializerAttributes.php @@ -8,6 +8,11 @@ class AttatchTagSerializerAttributes { + /** + * @var SettingsRepositoryInterface + */ + protected $settings; + /** * @param SettingsRepositoryInterface $settings */ diff --git a/src/Controller/BlogItemController.php b/src/Controller/BlogItemController.php index eb432d1..9eeb0c9 100644 --- a/src/Controller/BlogItemController.php +++ b/src/Controller/BlogItemController.php @@ -15,6 +15,31 @@ class BlogItemController { + /** + * @var Client + */ + protected $api; + + /** + * @var UrlGenerator + */ + protected $url; + + /** + * @var SettingsRepositoryInterface + */ + protected $settings; + + /** + * @var TranslatorInterface + */ + protected $translator; + + /** + * @var TagRepository + */ + protected $tagRepository; + public function __construct(Client $api, UrlGenerator $url, SettingsRepositoryInterface $settings, TagRepository $tagRepository, TranslatorInterface $translator) { $this->api = $api; diff --git a/src/Listeners/CreateBlogMetaOnDiscussionCreate.php b/src/Listeners/CreateBlogMetaOnDiscussionCreate.php index 07cc43e..c8559f8 100644 --- a/src/Listeners/CreateBlogMetaOnDiscussionCreate.php +++ b/src/Listeners/CreateBlogMetaOnDiscussionCreate.php @@ -10,6 +10,11 @@ class CreateBlogMetaOnDiscussionCreate { + /** + * @var SettingsRepositoryInterface + */ + protected $settings; + /** * CreateBlogMetaOnDiscussionCreate constructor. * diff --git a/src/Query/FilterDiscussionsForBlogPosts.php b/src/Query/FilterDiscussionsForBlogPosts.php index a048d20..ce84fd7 100644 --- a/src/Query/FilterDiscussionsForBlogPosts.php +++ b/src/Query/FilterDiscussionsForBlogPosts.php @@ -9,7 +9,12 @@ class FilterDiscussionsForBlogPosts { - /** + /** + * @var SettingsRepositoryInterface + */ + protected $settings; + + /** * FilterDiscussionsForBlogPosts constructor. * * @param SettingsRepositoryInterface $settings From 99e8105cfb2c037b68ee2e432560a9a687170287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ng=C3=B4=20Qu=E1=BB=91c=20=C4=90=E1=BA=A1t?= Date: Thu, 26 Oct 2023 21:32:31 +0700 Subject: [PATCH 2/2] update --- src/Query/FilterDiscussionsForBlogPosts.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Query/FilterDiscussionsForBlogPosts.php b/src/Query/FilterDiscussionsForBlogPosts.php index ce84fd7..6100bf0 100644 --- a/src/Query/FilterDiscussionsForBlogPosts.php +++ b/src/Query/FilterDiscussionsForBlogPosts.php @@ -9,12 +9,12 @@ class FilterDiscussionsForBlogPosts { - /** + /** * @var SettingsRepositoryInterface */ protected $settings; - /** + /** * FilterDiscussionsForBlogPosts constructor. * * @param SettingsRepositoryInterface $settings @@ -66,4 +66,4 @@ public function __invoke(FilterState $filter, QueryCriteria $queryCriteria) }); } } -} \ No newline at end of file +}