From 1d2c286d88b8e9a27b94129c93251b0de3ff4426 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: Tue, 31 Oct 2023 17:34:23 +0700 Subject: [PATCH] fix: fix deprecated dynamic property in php8.2 (#166) * fix: fix deprecated dynamic property in php8.2 * update --- 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..6100bf0 100644 --- a/src/Query/FilterDiscussionsForBlogPosts.php +++ b/src/Query/FilterDiscussionsForBlogPosts.php @@ -9,6 +9,11 @@ class FilterDiscussionsForBlogPosts { + /** + * @var SettingsRepositoryInterface + */ + protected $settings; + /** * FilterDiscussionsForBlogPosts constructor. * @@ -61,4 +66,4 @@ public function __invoke(FilterState $filter, QueryCriteria $queryCriteria) }); } } -} \ No newline at end of file +}