From 449ff5b427e5db9d8ea92797a00502226d6918a3 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Tue, 15 Oct 2024 17:31:51 +0530 Subject: [PATCH 1/4] Fixes issue of Method normalize with return type '' is different to return type 'ArrayObject|array|null|scalar' of inherited method NormalizerInterface::normalize --- .github/workflows/php-test-workflow.yml | 4 ---- composer.json | 12 ++++++------ .../Normalizer/AcceptedRatePlanNormalizer.php | 2 +- src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php | 2 +- .../Normalizer/AppGroupMembershipNormalizer.php | 2 +- src/Api/ApigeeX/Normalizer/AppNormalizer.php | 2 +- src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php | 2 +- src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php | 2 +- .../ApigeeX/Normalizer/RatePlanNormalizerFactory.php | 2 +- .../ApigeeX/Normalizer/RatePlanRateNormalizer.php | 2 +- .../Normalizer/StandardRatePlanNormalizer.php | 2 +- .../Normalizer/AppCredentialNormalizer.php | 2 +- src/Api/Management/Normalizer/AppNormalizer.php | 2 +- .../Normalizer/CompanyMembershipNormalizer.php | 2 +- src/Api/Management/Query/StatsQueryNormalizer.php | 2 +- .../Normalizer/AcceptedRatePlanNormalizer.php | 2 +- .../Monetization/Normalizer/ApiPackageNormalizer.php | 2 +- .../CompanyPaymentTransactionNormalizer.php | 2 +- .../Normalizer/DateTimeZoneNormalizer.php | 2 +- .../DeveloperCategoryRatePlanNormalizer.php | 2 +- .../DeveloperPaymentTransactionNormalizer.php | 2 +- src/Api/Monetization/Normalizer/EntityNormalizer.php | 2 +- .../Normalizer/LegalEntityNormalizer.php | 2 +- .../Normalizer/LegalEntityRatePlanNormalizer.php | 2 +- .../LegalEntityReportDefinitionNormalizer.php | 2 +- .../Monetization/Normalizer/RatePlanNormalizer.php | 2 +- .../Normalizer/RatePlanNormalizerFactory.php | 2 +- .../Normalizer/RatePlanRateNormalizer.php | 2 +- .../Normalizer/ReportCriteriaNormalizer.php | 2 +- .../Normalizer/ReportDefinitionNormalizer.php | 2 +- .../Normalizer/StandardRatePlanNormalizer.php | 2 +- .../Normalizer/TermsAndConditionsNormalizer.php | 2 +- src/Normalizer/CredentialProductNormalizer.php | 2 +- src/Normalizer/EdgeDateNormalizer.php | 2 +- src/Normalizer/KeyValueMapNormalizer.php | 2 +- src/Normalizer/ObjectNormalizer.php | 2 +- src/Normalizer/PropertiesPropertyNormalizer.php | 2 +- src/Serializer/EntitySerializer.php | 2 +- 38 files changed, 42 insertions(+), 46 deletions(-) diff --git a/.github/workflows/php-test-workflow.yml b/.github/workflows/php-test-workflow.yml index e1227ab2..b1c2b78e 100644 --- a/.github/workflows/php-test-workflow.yml +++ b/.github/workflows/php-test-workflow.yml @@ -11,10 +11,6 @@ jobs: strategy: matrix: include: - - php: '8.1' - dependencies-preference: " " - - php: '8.1' - dependencies-preference: "--prefer-lowest" - php: '8.2' dependencies-preference: " " - php: '8.2' diff --git a/composer.json b/composer.json index dd66b3f1..db9103f5 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "homepage": "http://github.com/apigee/apigee-client-php", "license": "Apache-2.0", "require": { - "php": "~8.1 || ~8.2 || ~8.3", + "php": "~8.2 || ~8.3", "ext-json": "*", "ext-openssl": "*", "ext-reflection": "*", @@ -28,10 +28,10 @@ "php-http/message-factory": "^1.0", "phpdocumentor/reflection-docblock": "^5.0", "psr/http-message": "^1.0 || ^2.0", - "symfony/options-resolver": "^6.4.8", - "symfony/property-access": "^6.4.9", - "symfony/property-info": "^6.4.9", - "symfony/serializer": "^6.4.9" + "symfony/options-resolver": "^7.1", + "symfony/property-access": "^7.1", + "symfony/property-info": "^7.1", + "symfony/serializer": "^7.1" }, "require-dev": { "dms/phpunit-arraysubset-asserts": "^0.4.0", @@ -46,7 +46,7 @@ "phpmetrics/phpmetrics": "^2.7", "phpunit/phpunit": "^9.6", "sebastian/comparator": "^4.0.5", - "symfony/cache": "^6.4.9", + "symfony/cache": "^7.1", "vimeo/psalm": "^5.20" }, "autoload": { diff --git a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php index e84a51c4..f3b7e27b 100755 --- a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php @@ -32,7 +32,7 @@ class AcceptedRatePlanNormalizer extends EntityNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var AcceptedRatePlanInterface $object */ /** @var object $normalized */ diff --git a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php index 05ab9e6c..84d53294 100755 --- a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php @@ -48,7 +48,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php index f0fba9e9..7c10d2cd 100644 --- a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php @@ -29,7 +29,7 @@ class AppGroupMembershipNormalizer implements NormalizerInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $normalized = []; diff --git a/src/Api/ApigeeX/Normalizer/AppNormalizer.php b/src/Api/ApigeeX/Normalizer/AppNormalizer.php index 3f7b3564..5bbbf7cb 100644 --- a/src/Api/ApigeeX/Normalizer/AppNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppNormalizer.php @@ -41,7 +41,7 @@ public function supportsNormalization($data, $format = null) * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php b/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php index a7e73b0d..a883f01e 100644 --- a/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php @@ -29,7 +29,7 @@ class BillingTypeNormalizer extends EntityNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var BillingTypeInterface $object */ /** @var object $normalized */ diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php index c8a45393..54564552 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php @@ -52,7 +52,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php index 3debb38a..dc5dee7a 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php @@ -56,7 +56,7 @@ public function __construct(array $normalizers = []) * @psalm-suppress InvalidNullableReturnType - There are going to be at * least one normalizer always that can normalize data here. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { foreach ($this->normalizers as $normalizer) { // Return the result from the first denormalizer that can diff --git a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php index e2626f1c..ae045207 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php @@ -30,7 +30,7 @@ class RatePlanRateNormalizer extends ObjectNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php index dda8754f..55f49fec 100755 --- a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php @@ -29,7 +29,7 @@ class StandardRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Management/Normalizer/AppCredentialNormalizer.php b/src/Api/Management/Normalizer/AppCredentialNormalizer.php index 0903c413..f1dd5788 100644 --- a/src/Api/Management/Normalizer/AppCredentialNormalizer.php +++ b/src/Api/Management/Normalizer/AppCredentialNormalizer.php @@ -41,7 +41,7 @@ public function supportsNormalization($data, $format = null) * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Management/Normalizer/AppNormalizer.php b/src/Api/Management/Normalizer/AppNormalizer.php index 5010f277..9f6eb771 100644 --- a/src/Api/Management/Normalizer/AppNormalizer.php +++ b/src/Api/Management/Normalizer/AppNormalizer.php @@ -41,7 +41,7 @@ public function supportsNormalization($data, $format = null) * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php b/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php index 68065c92..4e6c3150 100644 --- a/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php +++ b/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php @@ -30,7 +30,7 @@ class CompanyMembershipNormalizer implements NormalizerInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $normalized = [ 'developer' => [], diff --git a/src/Api/Management/Query/StatsQueryNormalizer.php b/src/Api/Management/Query/StatsQueryNormalizer.php index 532cbf57..07e66b36 100644 --- a/src/Api/Management/Query/StatsQueryNormalizer.php +++ b/src/Api/Management/Query/StatsQueryNormalizer.php @@ -52,7 +52,7 @@ public function __construct() /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var StatsQueryInterface $object */ // Transform the object to JSON and back to an array to keep boolean values as boolean. diff --git a/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php index 85242c3b..f0226d31 100644 --- a/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php @@ -31,7 +31,7 @@ class AcceptedRatePlanNormalizer extends EntityNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var AcceptedRatePlanInterface $object */ /** @var object $normalized */ diff --git a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php index 1be6dfb4..d01441b1 100644 --- a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php +++ b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php @@ -47,7 +47,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $normalized = (array) parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php index f86a78d6..d1fad4de 100644 --- a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php @@ -47,7 +47,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php index 8eba9f35..e6c3cc42 100644 --- a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php +++ b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php @@ -26,7 +26,7 @@ class DateTimeZoneNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { return $object->getName(); } diff --git a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php index c56ffd0d..5543ccf7 100644 --- a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php @@ -29,7 +29,7 @@ class DeveloperCategoryRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php index 341a715a..bb35ca89 100644 --- a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php @@ -28,7 +28,7 @@ class DeveloperPaymentTransactionNormalizer extends PaymentTransactionNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/EntityNormalizer.php b/src/Api/Monetization/Normalizer/EntityNormalizer.php index cbae260c..0f7a8175 100644 --- a/src/Api/Monetization/Normalizer/EntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/EntityNormalizer.php @@ -63,7 +63,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType stdClass is also an object. * @psalm-suppress InvalidPropertyFetch. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $normalized = (array) parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php index 3259c4e6..a19aaa72 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php @@ -49,7 +49,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php index 50c51842..bae1a783 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php @@ -28,7 +28,7 @@ abstract class LegalEntityRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php index 54f1bb9e..ebc5da08 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php @@ -26,7 +26,7 @@ abstract class LegalEntityReportDefinitionNormalizer extends ReportDefinitionNor * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizer.php b/src/Api/Monetization/Normalizer/RatePlanNormalizer.php index 95b008f4..4dc96ee6 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizer.php @@ -51,7 +51,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php index 0af7aff6..216ea4b8 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php @@ -53,7 +53,7 @@ public function __construct(array $normalizers = []) * @psalm-suppress InvalidNullableReturnType - There are going to be at * least one normalizer always that can normalize data here. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { foreach ($this->normalizers as $normalizer) { // Return the result from the first denormalizer that can diff --git a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php index b8f47969..3058eff1 100644 --- a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php @@ -30,7 +30,7 @@ class RatePlanRateNormalizer extends ObjectNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php index ff81fbd4..4825b543 100644 --- a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php +++ b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php @@ -59,7 +59,7 @@ public function __construct(string $organization, ?ClassMetadataFactoryInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php index 2cf26536..6829479f 100644 --- a/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php @@ -50,7 +50,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var ReportDefinitionInterface $object */ /** @var object $normalized */ diff --git a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php index 3914a8cf..b6f5b625 100644 --- a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php @@ -29,7 +29,7 @@ class StandardRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php index 80d5c8d1..5721f84b 100644 --- a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php +++ b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php @@ -51,7 +51,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Normalizer/CredentialProductNormalizer.php b/src/Normalizer/CredentialProductNormalizer.php index 7a1b1adb..060ce86e 100644 --- a/src/Normalizer/CredentialProductNormalizer.php +++ b/src/Normalizer/CredentialProductNormalizer.php @@ -33,7 +33,7 @@ class CredentialProductNormalizer implements NormalizerInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /* @var \Apigee\Edge\Structure\CredentialProductInterface $object */ $asObject = [ diff --git a/src/Normalizer/EdgeDateNormalizer.php b/src/Normalizer/EdgeDateNormalizer.php index 77025207..dcd95924 100644 --- a/src/Normalizer/EdgeDateNormalizer.php +++ b/src/Normalizer/EdgeDateNormalizer.php @@ -34,7 +34,7 @@ public function supportsNormalization($data, $format = null) /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { /* @var \DateTimeInterface $object */ return $object->getTimestamp() * 1000; diff --git a/src/Normalizer/KeyValueMapNormalizer.php b/src/Normalizer/KeyValueMapNormalizer.php index 998c0427..b11e9a3b 100644 --- a/src/Normalizer/KeyValueMapNormalizer.php +++ b/src/Normalizer/KeyValueMapNormalizer.php @@ -29,7 +29,7 @@ class KeyValueMapNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $return = []; foreach ($object->values() as $key => $value) { diff --git a/src/Normalizer/ObjectNormalizer.php b/src/Normalizer/ObjectNormalizer.php index 644e9d21..587a59e3 100644 --- a/src/Normalizer/ObjectNormalizer.php +++ b/src/Normalizer/ObjectNormalizer.php @@ -94,7 +94,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress PossiblyInvalidArgument First argument of array_filter is always an array. * @psalm-suppress PossiblyNullArgument First argument of array_filter is always an array. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $asArray = $this->objectNormalizer->normalize($object, $this->format, $context); // Exclude null values from the output, even if PATCH is not supported on Apigee Edge diff --git a/src/Normalizer/PropertiesPropertyNormalizer.php b/src/Normalizer/PropertiesPropertyNormalizer.php index 7818c637..8b8676ea 100644 --- a/src/Normalizer/PropertiesPropertyNormalizer.php +++ b/src/Normalizer/PropertiesPropertyNormalizer.php @@ -34,7 +34,7 @@ class PropertiesPropertyNormalizer extends KeyValueMapNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $return = [ 'property' => parent::normalize($object, $format, $context), diff --git a/src/Serializer/EntitySerializer.php b/src/Serializer/EntitySerializer.php index 24e90e31..726badc1 100755 --- a/src/Serializer/EntitySerializer.php +++ b/src/Serializer/EntitySerializer.php @@ -90,7 +90,7 @@ public function supportsDenormalization($data, $type, $format = null) /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { return $this->serializer->normalize($object, $format, $context); } From 7128cb1a31ede818d484906eb06c1746bb07bdc0 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Tue, 15 Oct 2024 17:38:41 +0530 Subject: [PATCH 2/4] Reverting composer and workflow changes --- .github/workflows/php-test-workflow.yml | 4 ++++ composer.json | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/php-test-workflow.yml b/.github/workflows/php-test-workflow.yml index b1c2b78e..e1227ab2 100644 --- a/.github/workflows/php-test-workflow.yml +++ b/.github/workflows/php-test-workflow.yml @@ -11,6 +11,10 @@ jobs: strategy: matrix: include: + - php: '8.1' + dependencies-preference: " " + - php: '8.1' + dependencies-preference: "--prefer-lowest" - php: '8.2' dependencies-preference: " " - php: '8.2' diff --git a/composer.json b/composer.json index db9103f5..dd66b3f1 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "homepage": "http://github.com/apigee/apigee-client-php", "license": "Apache-2.0", "require": { - "php": "~8.2 || ~8.3", + "php": "~8.1 || ~8.2 || ~8.3", "ext-json": "*", "ext-openssl": "*", "ext-reflection": "*", @@ -28,10 +28,10 @@ "php-http/message-factory": "^1.0", "phpdocumentor/reflection-docblock": "^5.0", "psr/http-message": "^1.0 || ^2.0", - "symfony/options-resolver": "^7.1", - "symfony/property-access": "^7.1", - "symfony/property-info": "^7.1", - "symfony/serializer": "^7.1" + "symfony/options-resolver": "^6.4.8", + "symfony/property-access": "^6.4.9", + "symfony/property-info": "^6.4.9", + "symfony/serializer": "^6.4.9" }, "require-dev": { "dms/phpunit-arraysubset-asserts": "^0.4.0", @@ -46,7 +46,7 @@ "phpmetrics/phpmetrics": "^2.7", "phpunit/phpunit": "^9.6", "sebastian/comparator": "^4.0.5", - "symfony/cache": "^7.1", + "symfony/cache": "^6.4.9", "vimeo/psalm": "^5.20" }, "autoload": { From 2a2d499525cd0b2a5efdaf029292d36c36b077dd Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Tue, 15 Oct 2024 17:46:06 +0530 Subject: [PATCH 3/4] PHPCS fixes --- src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/AppNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php | 3 ++- src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php | 3 ++- src/Api/Management/Normalizer/AppCredentialNormalizer.php | 3 ++- src/Api/Management/Normalizer/AppNormalizer.php | 3 ++- src/Api/Management/Normalizer/CompanyMembershipNormalizer.php | 2 +- src/Api/Management/Query/StatsQueryNormalizer.php | 3 ++- .../Monetization/Normalizer/AcceptedRatePlanNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/ApiPackageNormalizer.php | 3 ++- .../Normalizer/CompanyPaymentTransactionNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php | 3 ++- .../Normalizer/DeveloperCategoryRatePlanNormalizer.php | 3 ++- .../Normalizer/DeveloperPaymentTransactionNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/EntityNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/LegalEntityNormalizer.php | 3 ++- .../Monetization/Normalizer/LegalEntityRatePlanNormalizer.php | 3 ++- .../Normalizer/LegalEntityReportDefinitionNormalizer.php | 4 +++- src/Api/Monetization/Normalizer/RatePlanNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php | 3 ++- src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php | 3 ++- .../Monetization/Normalizer/ReportDefinitionNormalizer.php | 3 ++- .../Monetization/Normalizer/StandardRatePlanNormalizer.php | 3 ++- .../Monetization/Normalizer/TermsAndConditionsNormalizer.php | 3 ++- src/Normalizer/CredentialProductNormalizer.php | 2 +- src/Normalizer/EdgeDateNormalizer.php | 3 ++- src/Normalizer/KeyValueMapNormalizer.php | 3 ++- src/Normalizer/ObjectNormalizer.php | 2 +- src/Normalizer/PropertiesPropertyNormalizer.php | 2 +- src/Serializer/EntitySerializer.php | 3 ++- 36 files changed, 69 insertions(+), 36 deletions(-) diff --git a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php index f3b7e27b..0b48ca33 100755 --- a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\AcceptedRatePlanInterface; use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; +use ArrayObject; class AcceptedRatePlanNormalizer extends EntityNormalizer { @@ -32,7 +33,7 @@ class AcceptedRatePlanNormalizer extends EntityNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var AcceptedRatePlanInterface $object */ /** @var object $normalized */ diff --git a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php index 84d53294..2f8d9ed2 100755 --- a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\ApiProductInterface; use Apigee\Edge\Api\Monetization\NameConverter\ApiPackageNameConverter; use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -48,7 +49,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php index 7c10d2cd..49ecc403 100644 --- a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Api\ApigeeX\Normalizer; use Apigee\Edge\Api\ApigeeX\Structure\AppGroupMembership; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class AppGroupMembershipNormalizer implements NormalizerInterface @@ -29,7 +30,7 @@ class AppGroupMembershipNormalizer implements NormalizerInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = []; diff --git a/src/Api/ApigeeX/Normalizer/AppNormalizer.php b/src/Api/ApigeeX/Normalizer/AppNormalizer.php index 5bbbf7cb..649c925b 100644 --- a/src/Api/ApigeeX/Normalizer/AppNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Management\Entity\AppInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -41,7 +42,7 @@ public function supportsNormalization($data, $format = null) * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php b/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php index a883f01e..212eaca4 100644 --- a/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\BillingTypeInterface; use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; +use ArrayObject; class BillingTypeNormalizer extends EntityNormalizer { @@ -29,7 +30,7 @@ class BillingTypeNormalizer extends EntityNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var BillingTypeInterface $object */ /** @var object $normalized */ diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php index 54564552..7aae5d2f 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php @@ -23,6 +23,7 @@ use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; use Apigee\Edge\Exception\UninitializedPropertyException; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -52,7 +53,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php index dc5dee7a..82aa8a94 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\Monetization\Normalizer\CompanyRatePlanNormalizer; use Apigee\Edge\Api\Monetization\Normalizer\DeveloperCategoryRatePlanNormalizer; use Apigee\Edge\Api\Monetization\Normalizer\DeveloperRatePlanNormalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; use Symfony\Component\Serializer\SerializerAwareTrait; @@ -56,7 +57,7 @@ public function __construct(array $normalizers = []) * @psalm-suppress InvalidNullableReturnType - There are going to be at * least one normalizer always that can normalize data here. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { foreach ($this->normalizers as $normalizer) { // Return the result from the first denormalizer that can diff --git a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php index ae045207..8049388f 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\Monetization\Structure\RatePlanRate; use Apigee\Edge\Api\Monetization\Structure\RatePlanRateRevShare; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; class RatePlanRateNormalizer extends ObjectNormalizer { @@ -30,7 +31,7 @@ class RatePlanRateNormalizer extends ObjectNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php index 55f49fec..cf796a58 100755 --- a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\RatePlanInterface; use Apigee\Edge\Api\ApigeeX\Entity\StandardRatePlanInterface; +use ArrayObject; class StandardRatePlanNormalizer extends RatePlanNormalizer { @@ -29,7 +30,7 @@ class StandardRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Management/Normalizer/AppCredentialNormalizer.php b/src/Api/Management/Normalizer/AppCredentialNormalizer.php index f1dd5788..8cc96833 100644 --- a/src/Api/Management/Normalizer/AppCredentialNormalizer.php +++ b/src/Api/Management/Normalizer/AppCredentialNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Management\Entity\AppCredentialInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -41,7 +42,7 @@ public function supportsNormalization($data, $format = null) * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Management/Normalizer/AppNormalizer.php b/src/Api/Management/Normalizer/AppNormalizer.php index 9f6eb771..635e7191 100644 --- a/src/Api/Management/Normalizer/AppNormalizer.php +++ b/src/Api/Management/Normalizer/AppNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Management\Entity\AppInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -41,7 +42,7 @@ public function supportsNormalization($data, $format = null) * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php b/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php index 4e6c3150..97f7f7cc 100644 --- a/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php +++ b/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php @@ -30,7 +30,7 @@ class CompanyMembershipNormalizer implements NormalizerInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = [ 'developer' => [], diff --git a/src/Api/Management/Query/StatsQueryNormalizer.php b/src/Api/Management/Query/StatsQueryNormalizer.php index 07e66b36..083ac2df 100644 --- a/src/Api/Management/Query/StatsQueryNormalizer.php +++ b/src/Api/Management/Query/StatsQueryNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Api\Management\Query; use Apigee\Edge\Serializer\JsonEncoder; +use ArrayObject; use DateTimeZone; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -52,7 +53,7 @@ public function __construct() /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var StatsQueryInterface $object */ // Transform the object to JSON and back to an array to keep boolean values as boolean. diff --git a/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php index f0226d31..569967fe 100644 --- a/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; +use ArrayObject; class AcceptedRatePlanNormalizer extends EntityNormalizer { @@ -31,7 +32,7 @@ class AcceptedRatePlanNormalizer extends EntityNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var AcceptedRatePlanInterface $object */ /** @var object $normalized */ diff --git a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php index d01441b1..53fe1454 100644 --- a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php +++ b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\ApiPackageInterface; use Apigee\Edge\Api\Monetization\NameConverter\ApiPackageNameConverter; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -47,7 +48,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = (array) parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php index d1fad4de..335b2ee1 100644 --- a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\NameConverter\CompanyRatePlanNameConverter; use Apigee\Edge\Api\Monetization\Structure\CompanyPaymentTransaction; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -47,7 +48,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php index e6c3cc42..165cede8 100644 --- a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php +++ b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php @@ -18,6 +18,7 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; +use ArrayObject; use DateTimeZone; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -26,7 +27,7 @@ class DateTimeZoneNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { return $object->getName(); } diff --git a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php index 5543ccf7..417a08bf 100644 --- a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperCategoryRatePlanInterface; use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; +use ArrayObject; class DeveloperCategoryRatePlanNormalizer extends RatePlanNormalizer { @@ -29,7 +30,7 @@ class DeveloperCategoryRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php index bb35ca89..a7e0bf94 100644 --- a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; use Apigee\Edge\Api\Monetization\Structure\DeveloperPaymentTransaction; +use ArrayObject; class DeveloperPaymentTransactionNormalizer extends PaymentTransactionNormalizer { @@ -28,7 +29,7 @@ class DeveloperPaymentTransactionNormalizer extends PaymentTransactionNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/EntityNormalizer.php b/src/Api/Monetization/Normalizer/EntityNormalizer.php index 0f7a8175..ff1584df 100644 --- a/src/Api/Monetization/Normalizer/EntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/EntityNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Structure\NestedObjectReferenceInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use ReflectionObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; @@ -63,7 +64,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType stdClass is also an object. * @psalm-suppress InvalidPropertyFetch. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = (array) parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php index a19aaa72..8c1519c1 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php @@ -22,6 +22,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperInterface; use Apigee\Edge\Api\Monetization\Entity\LegalEntityInterface; use Apigee\Edge\Api\Monetization\NameConverter\LegalEntityNameConvert; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -49,7 +50,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php index bae1a783..0fe3c49f 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; +use ArrayObject; abstract class LegalEntityRatePlanNormalizer extends RatePlanNormalizer { @@ -28,7 +29,7 @@ abstract class LegalEntityRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php index ebc5da08..2790aca3 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php @@ -18,6 +18,8 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; +use ArrayObject; + abstract class LegalEntityReportDefinitionNormalizer extends ReportDefinitionNormalizer { /** @@ -26,7 +28,7 @@ abstract class LegalEntityReportDefinitionNormalizer extends ReportDefinitionNor * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizer.php b/src/Api/Monetization/Normalizer/RatePlanNormalizer.php index 4dc96ee6..240a7a56 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizer.php @@ -22,6 +22,7 @@ use Apigee\Edge\Api\Monetization\NameConverter\RatePlanNameConverter; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; use Apigee\Edge\Exception\UninitializedPropertyException; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -51,7 +52,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php index 216ea4b8..69dff853 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php @@ -18,6 +18,7 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; use Symfony\Component\Serializer\SerializerAwareTrait; @@ -53,7 +54,7 @@ public function __construct(array $normalizers = []) * @psalm-suppress InvalidNullableReturnType - There are going to be at * least one normalizer always that can normalize data here. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { foreach ($this->normalizers as $normalizer) { // Return the result from the first denormalizer that can diff --git a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php index 3058eff1..d4324550 100644 --- a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\Monetization\Structure\RatePlanRate; use Apigee\Edge\Api\Monetization\Structure\RatePlanRateRevShare; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; class RatePlanRateNormalizer extends ObjectNormalizer { @@ -30,7 +31,7 @@ class RatePlanRateNormalizer extends ObjectNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php index 4825b543..46a0c440 100644 --- a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php +++ b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php @@ -22,6 +22,7 @@ use Apigee\Edge\Api\Monetization\Structure\Reports\Criteria\AbstractCriteria; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use DateTimeZone; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; @@ -59,7 +60,7 @@ public function __construct(string $organization, ?ClassMetadataFactoryInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php index 6829479f..42be4c41 100644 --- a/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\ReportDefinitionInterface; use Apigee\Edge\Api\Monetization\NameConverter\ReportDefinitionNameConverter; use Apigee\Edge\Api\Monetization\Utility\ReportTypeFromCriteriaHelperTrait; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -50,7 +51,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var ReportDefinitionInterface $object */ /** @var object $normalized */ diff --git a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php index b6f5b625..643210a1 100644 --- a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; use Apigee\Edge\Api\Monetization\Entity\StandardRatePlanInterface; +use ArrayObject; class StandardRatePlanNormalizer extends RatePlanNormalizer { @@ -29,7 +30,7 @@ class StandardRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php index 5721f84b..a0791114 100644 --- a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php +++ b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php @@ -22,6 +22,7 @@ use Apigee\Edge\Api\Monetization\NameConverter\TermsAndConditionsNameConverter; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; use Apigee\Edge\Exception\UninitializedPropertyException; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -51,7 +52,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Normalizer/CredentialProductNormalizer.php b/src/Normalizer/CredentialProductNormalizer.php index 060ce86e..a7d293a1 100644 --- a/src/Normalizer/CredentialProductNormalizer.php +++ b/src/Normalizer/CredentialProductNormalizer.php @@ -33,7 +33,7 @@ class CredentialProductNormalizer implements NormalizerInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /* @var \Apigee\Edge\Structure\CredentialProductInterface $object */ $asObject = [ diff --git a/src/Normalizer/EdgeDateNormalizer.php b/src/Normalizer/EdgeDateNormalizer.php index dcd95924..45b1f028 100644 --- a/src/Normalizer/EdgeDateNormalizer.php +++ b/src/Normalizer/EdgeDateNormalizer.php @@ -18,6 +18,7 @@ namespace Apigee\Edge\Normalizer; +use ArrayObject; use DateTimeInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -34,7 +35,7 @@ public function supportsNormalization($data, $format = null) /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /* @var \DateTimeInterface $object */ return $object->getTimestamp() * 1000; diff --git a/src/Normalizer/KeyValueMapNormalizer.php b/src/Normalizer/KeyValueMapNormalizer.php index b11e9a3b..4f2fa86c 100644 --- a/src/Normalizer/KeyValueMapNormalizer.php +++ b/src/Normalizer/KeyValueMapNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Normalizer; use Apigee\Edge\Structure\KeyValueMapInterface; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -29,7 +30,7 @@ class KeyValueMapNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $return = []; foreach ($object->values() as $key => $value) { diff --git a/src/Normalizer/ObjectNormalizer.php b/src/Normalizer/ObjectNormalizer.php index 587a59e3..103843ce 100644 --- a/src/Normalizer/ObjectNormalizer.php +++ b/src/Normalizer/ObjectNormalizer.php @@ -94,7 +94,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress PossiblyInvalidArgument First argument of array_filter is always an array. * @psalm-suppress PossiblyNullArgument First argument of array_filter is always an array. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $asArray = $this->objectNormalizer->normalize($object, $this->format, $context); // Exclude null values from the output, even if PATCH is not supported on Apigee Edge diff --git a/src/Normalizer/PropertiesPropertyNormalizer.php b/src/Normalizer/PropertiesPropertyNormalizer.php index 8b8676ea..11fd557c 100644 --- a/src/Normalizer/PropertiesPropertyNormalizer.php +++ b/src/Normalizer/PropertiesPropertyNormalizer.php @@ -34,7 +34,7 @@ class PropertiesPropertyNormalizer extends KeyValueMapNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $return = [ 'property' => parent::normalize($object, $format, $context), diff --git a/src/Serializer/EntitySerializer.php b/src/Serializer/EntitySerializer.php index 726badc1..d9334260 100755 --- a/src/Serializer/EntitySerializer.php +++ b/src/Serializer/EntitySerializer.php @@ -25,6 +25,7 @@ use Apigee\Edge\Normalizer\EdgeDateNormalizer; use Apigee\Edge\Normalizer\KeyValueMapNormalizer; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use Psr\Http\Message\ResponseInterface; use ReflectionMethod; use ReflectionObject; @@ -90,7 +91,7 @@ public function supportsDenormalization($data, $type, $format = null) /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { return $this->serializer->normalize($object, $format, $context); } From fceb7f54c17d3bc49c963762a578ec879add2e41 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Wed, 16 Oct 2024 14:19:34 +0530 Subject: [PATCH 4/4] 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.