From dd9500fc31a13f7540918c3264cd549fb222e3d2 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Tue, 15 Oct 2024 11:02:00 +0530 Subject: [PATCH 1/5] Fixes for issue UnimplementedInterfaceMethod: Method getsupportedtypes is not defined --- .../Denormalizer/AppGroupMembershipDenormalizer.php | 10 ++++++++++ src/Api/Management/Query/StatsQueryNormalizer.php | 12 ++++++++++++ src/Serializer/EntitySerializer.php | 10 ++++++++++ 3 files changed, 32 insertions(+) diff --git a/src/Api/ApigeeX/Denormalizer/AppGroupMembershipDenormalizer.php b/src/Api/ApigeeX/Denormalizer/AppGroupMembershipDenormalizer.php index 357e2912..87ee3f81 100644 --- a/src/Api/ApigeeX/Denormalizer/AppGroupMembershipDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/AppGroupMembershipDenormalizer.php @@ -61,4 +61,14 @@ public function supportsDenormalization($data, $type, $format = null) return AppGroupMembership::class === $type || $type instanceof AppGroupMembership; } + + /** + * {@inheritdoc} + */ + public function getSupportedTypes(?string $format): array + { + return [ + AppGroupMembership::class => true, + ]; + } } diff --git a/src/Api/Management/Query/StatsQueryNormalizer.php b/src/Api/Management/Query/StatsQueryNormalizer.php index 532cbf57..b495630c 100644 --- a/src/Api/Management/Query/StatsQueryNormalizer.php +++ b/src/Api/Management/Query/StatsQueryNormalizer.php @@ -20,6 +20,8 @@ use Apigee\Edge\Serializer\JsonEncoder; use DateTimeZone; +use StatsQuery; +use StatsQueryInterface; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; @@ -96,4 +98,14 @@ public function supportsNormalization($data, $format = null) { return $data instanceof StatsQuery; } + + /** + * {@inheritdoc} + */ + public function getSupportedTypes(?string $format): array + { + return [ + StatsQueryInterface::class => true, + ]; + } } diff --git a/src/Serializer/EntitySerializer.php b/src/Serializer/EntitySerializer.php index 24e90e31..f1b04012 100755 --- a/src/Serializer/EntitySerializer.php +++ b/src/Serializer/EntitySerializer.php @@ -231,4 +231,14 @@ protected function jsonEncoder(): JsonEncoder // transforms objects to arrays. return new JsonEncoder(new JsonDecode()); } + + /** + * {@inheritdoc} + */ + public function getSupportedTypes(?string $format): array + { + return [ + EntitySerializerInterface::class => true, + ]; + } } From b9e529b3c520040ab881bd7ad235a0069261c012 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Tue, 15 Oct 2024 11:15:22 +0530 Subject: [PATCH 2/5] PHPCS fix --- src/Serializer/EntitySerializer.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Serializer/EntitySerializer.php b/src/Serializer/EntitySerializer.php index f1b04012..0bae115f 100755 --- a/src/Serializer/EntitySerializer.php +++ b/src/Serializer/EntitySerializer.php @@ -220,6 +220,16 @@ public function supportsEncoding($format): bool return $this->format === $format && $this->serializer->supportsEncoding($format); } + /** + * {@inheritdoc} + */ + public function getSupportedTypes(?string $format): array + { + return [ + EntitySerializerInterface::class => true, + ]; + } + /** * Allows subclasses to replace the default JSON encoder. * @@ -231,14 +241,4 @@ protected function jsonEncoder(): JsonEncoder // transforms objects to arrays. return new JsonEncoder(new JsonDecode()); } - - /** - * {@inheritdoc} - */ - public function getSupportedTypes(?string $format): array - { - return [ - EntitySerializerInterface::class => true, - ]; - } } From 9a0a1e8f24b467e31532e6419df4400789c9a147 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Tue, 15 Oct 2024 11:17:37 +0530 Subject: [PATCH 3/5] Fixed UndefinedDocblockClass --- src/Api/Management/Query/StatsQueryNormalizer.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Api/Management/Query/StatsQueryNormalizer.php b/src/Api/Management/Query/StatsQueryNormalizer.php index b495630c..746a80ea 100644 --- a/src/Api/Management/Query/StatsQueryNormalizer.php +++ b/src/Api/Management/Query/StatsQueryNormalizer.php @@ -21,7 +21,6 @@ use Apigee\Edge\Serializer\JsonEncoder; use DateTimeZone; use StatsQuery; -use StatsQueryInterface; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; @@ -105,7 +104,7 @@ public function supportsNormalization($data, $format = null) public function getSupportedTypes(?string $format): array { return [ - StatsQueryInterface::class => true, + StatsQuery::class => true, ]; } } From 8ddeb8657c6806ae159f7cab5290a258d6fddca4 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Tue, 15 Oct 2024 11:25:01 +0530 Subject: [PATCH 4/5] Fixed UndefinedDocblockClass --- src/Api/Management/Query/StatsQueryNormalizer.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Api/Management/Query/StatsQueryNormalizer.php b/src/Api/Management/Query/StatsQueryNormalizer.php index 746a80ea..0bff438a 100644 --- a/src/Api/Management/Query/StatsQueryNormalizer.php +++ b/src/Api/Management/Query/StatsQueryNormalizer.php @@ -20,7 +20,6 @@ use Apigee\Edge\Serializer\JsonEncoder; use DateTimeZone; -use StatsQuery; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; From 266b6977f726c7875eddc585c6c664d9e7706928 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Wed, 16 Oct 2024 14:19:34 +0530 Subject: [PATCH 5/5] Bump client version to 3.0.8 and changelog update (#388) --- CHANGELOG.md | 3 +++ src/ClientInterface.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa519ad9..717d1f9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # CHANGELOG +## [3.0.8](https://github.com/apigee/apigee-client-php/milestone/32?closed=1) +* [#379] Update option-resolver's symfony component version to its latest. + ## [3.0.7](https://github.com/apigee/apigee-client-php/milestone/31?closed=1) * [#374] Bump minimum required version of symfony/serializer. * [#376] Remove symfony/serializer conflict and bump version. diff --git a/src/ClientInterface.php b/src/ClientInterface.php index 6ef44f15..b5078803 100644 --- a/src/ClientInterface.php +++ b/src/ClientInterface.php @@ -63,7 +63,7 @@ interface ClientInterface extends HttpClient */ public const APIGEE_ON_GCP_ENDPOINT = 'https://apigee.googleapis.com/v1'; - public const VERSION = '3.0.7'; + public const VERSION = '3.0.8'; /** * Allows access to the last request, response and exception.