Skip to content

Commit

Permalink
Remove symfony/serializer conflict and bump version (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
shishir-intelli committed Sep 13, 2024
1 parent 04d36d2 commit f0271ea
Show file tree
Hide file tree
Showing 5 changed files with 234 additions and 31 deletions.
13 changes: 5 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.6",
"symfony/property-access": "^6.4.6",
"symfony/property-info": "^6.4.6",
"symfony/serializer": "^6.4.6"
"symfony/options-resolver": "^6.4.9",
"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",
Expand All @@ -46,12 +46,9 @@
"phpmetrics/phpmetrics": "^2.7",
"phpunit/phpunit": "^9.6",
"sebastian/comparator": "^4.0.5",
"symfony/cache": "^6.4.6",
"symfony/cache": "^6.4.9",
"vimeo/psalm": "^5.20"
},
"conflict": {
"symfony/serializer": ">6.4.6"
},
"autoload": {
"psr-4": {
"Apigee\\Edge\\": "src"
Expand Down
212 changes: 194 additions & 18 deletions src/Api/Monetization/Structure/Reports/Criteria/AbstractCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
/**
* Base class for all supported Monetization reports.
*
* Boolean getters must be prefixed with "get" instead of "is" because
* property accessor tries to call property name (without prefix) earlier
* than "is" . ucfirst('propertyName') - which is a setter method here.
*
* @see https://github.com/symfony/property-access/blob/v4.2.5/PropertyAccessor.php#L433-L435
*
* @internal
*
* @see https://docs.apigee.com/api-platform/monetization/create-reports#repdefconfigapi
Expand Down Expand Up @@ -125,9 +119,24 @@ public function getApps(): array
/**
* @param string ...$appIds
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function apps(string ...$appIds): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setApps() instead.', E_USER_DEPRECATED);

return $this->setApps(...$appIds);
}

/**
* @param string ...$appIds
*
* @return self
*/
public function setApps(string ...$appIds): self
{
$this->apps = $appIds;

Expand All @@ -145,9 +154,24 @@ public function getCurrencies(): array
/**
* @param string ...$currencyIds
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function currencies(string ...$currencyIds): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setCurrencies() instead.', E_USER_DEPRECATED);

return $this->setCurrencies(...$currencyIds);
}

/**
* @param string ...$currencyIds
*
* @return self
*/
public function setCurrencies(string ...$currencyIds): self
{
$this->currencies = $currencyIds;

Expand All @@ -165,9 +189,26 @@ public function getCurrencyOption(): ?string
/**
* @param string|null $currencyOption
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function currencyOption(?string $currencyOption): self
{
// This tweak allows to reset the previously configured currency option
// by calling this method with an empty string or null.
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setCurrencyOption() instead.', E_USER_DEPRECATED);

return $this->setCurrencyOption($currencyOption);
}

/**
* @param string|null $currencyOption
*
* @return self
*/
public function setCurrencyOption(?string $currencyOption): self
{
// This tweak allows to reset the previously configured currency option
// by calling this method with an empty string or null.
Expand All @@ -179,9 +220,24 @@ public function currencyOption(?string $currencyOption): self
/**
* @param string ...$developerIds
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function developers(string ...$developerIds): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setDevelopers() instead.', E_USER_DEPRECATED);

return $this->setDevelopers(...$developerIds);
}

/**
* @param string ...$developerIds
*
* @return self
*/
public function setDevelopers(string ...$developerIds): self
{
$this->developers = $developerIds;

Expand All @@ -207,9 +263,24 @@ public function getApiPackages(): array
/**
* @param string ...$apiPackageIds
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function apiPackages(string ...$apiPackageIds): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setApiPackages() instead.', E_USER_DEPRECATED);

return $this->setApiPackages(...$apiPackageIds);
}

/**
* @param string ...$apiPackageIds
*
* @return self
*/
public function setApiPackages(string ...$apiPackageIds): self
{
$this->apiPackages = $apiPackageIds;

Expand All @@ -227,9 +298,24 @@ public function getApiProducts(): array
/**
* @param string ...$apiProductIds
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function apiProducts(string ...$apiProductIds): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setApiProducts() instead.', E_USER_DEPRECATED);

return $this->setApiProducts(...$apiProductIds);
}

/**
* @param string ...$apiProductIds
*
* @return self
*/
public function setApiProducts(string ...$apiProductIds): self
{
$this->apiProducts = $apiProductIds;

Expand All @@ -247,9 +333,24 @@ public function getPricingTypes(): array
/**
* @param string ...$pricingTypes
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function pricingTypes(string ...$pricingTypes): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setPricingTypes() instead.', E_USER_DEPRECATED);

return $this->setPricingTypes(...$pricingTypes);
}

/**
* @param string ...$pricingTypes
*
* @return self
*/
public function setPricingTypes(string ...$pricingTypes): self
{
$this->pricingTypes = $pricingTypes;

Expand All @@ -267,9 +368,24 @@ public function getRatePlanLevels(): array
/**
* @param string ...$ratePlanLevels
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function ratePlanLevels(string ...$ratePlanLevels): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setRatePlanLevels() instead.', E_USER_DEPRECATED);

return $this->setRatePlanLevels(...$ratePlanLevels);
}

/**
* @param string ...$ratePlanLevels
*
* @return self
*/
public function setRatePlanLevels(string ...$ratePlanLevels): self
{
$this->ratePlanLevels = $ratePlanLevels;

Expand Down Expand Up @@ -311,9 +427,24 @@ public function getShowTransactionType(): bool
/**
* @param bool $show
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function showRevenueSharePercentage(bool $show): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setShowRevenueSharePercentage() instead.', E_USER_DEPRECATED);

return $this->setShowRevenueSharePercentage($show);
}

/**
* @param bool $show
*
* @return self
*/
public function setShowRevenueSharePercentage(bool $show): self
{
$this->showRevenueSharePercentage = $show;

Expand All @@ -323,9 +454,24 @@ public function showRevenueSharePercentage(bool $show): self
/**
* @param bool $show
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function showSummary(bool $show): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setShowSummary() instead.', E_USER_DEPRECATED);

return $this->setShowSummary($show);
}

/**
* @param bool $show
*
* @return self
*/
public function setShowSummary(bool $show): self
{
$this->showSummary = $show;

Expand All @@ -335,9 +481,24 @@ public function showSummary(bool $show): self
/**
* @param bool $show
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function showTransactionDetail(bool $show): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setShowTransactionDetail() instead.', E_USER_DEPRECATED);

return $this->setShowTransactionDetail($show);
}

/**
* @param bool $show
*
* @return self
*/
public function setShowTransactionDetail(bool $show): self
{
$this->showTransactionDetail = $show;

Expand All @@ -347,9 +508,24 @@ public function showTransactionDetail(bool $show): self
/**
* @param bool $show
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function showTransactionType(bool $show): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setShowTransactionType() instead.', E_USER_DEPRECATED);

return $this->setShowTransactionType($show);
}

/**
* @param bool $show
*
* @return self
*/
public function setShowTransactionType(bool $show): self
{
$this->showTransactionType = $show;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,24 @@ public function getGroupBy(): array
/**
* @param string ...$groupBy
*
* @return \self
* @return self
*
* @deprecated in 3.0.7, will be removed in 4.0.0. No longer needed.
* https://github.com/apigee/apigee-client-php/issues/373
*/
public function groupBy(string ...$groupBy): self
{
trigger_error(__METHOD__ . ' is deprecated in 3.0.7, will be removed in 4.0.0: use setGroupBy() instead.', E_USER_DEPRECATED);

return $this->setGroupBy(...$groupBy);
}

/**
* @param string ...$groupBy
*
* @return self
*/
public function setGroupBy(string ...$groupBy): self
{
$this->groupBy = $groupBy;

Expand Down
Loading

0 comments on commit f0271ea

Please sign in to comment.