diff --git a/README.md b/README.md index 8696756a8..23ff8b6cb 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The easiest way to install the Mollie API client is by using [Composer](http://g composer require mollie/mollie-api-php ``` -To work with the most recent API version, ensure that you are using a version of this API client that is equal to or greater than 2.0.0. If you prefer to continue using the v1 API, make sure your client version is below 2.0.0. For guidance on transitioning from v1 to v2, please refer to the [migration notes](https://docs.mollie.com/migrating-v1-to-v2). +To work with the most recent API version, ensure that you are using a version of this API client that is equal to or greater than 2.0.0. If you prefer to continue using the v1 API, make sure your client version is below 2.0.0. For guidance on transitioning from v1 to v2, please refer to the [migration notes](https://docs.mollie.com/docs/migrating-from-v1-to-v2). ### Manual Installation ### If you're not familiar with using composer we've added a ZIP file to the releases containing the API client and all the packages normally installed by composer. @@ -396,6 +396,10 @@ $mollie->disableDebugging(); Please note that debugging is only available when using the default Guzzle http adapter (`GuzzleMollieHttpAdapter`). +## Upgrading + +Please see [UPGRADING](UPGRADING.md) for details. + ## API documentation ## For an in-depth understanding of our API, please explore the [Mollie Developer Portal](https://www.mollie.com/developers). Our API documentation is available in English. diff --git a/UPGRADING.md b/UPGRADING.md new file mode 100644 index 000000000..70232ce17 --- /dev/null +++ b/UPGRADING.md @@ -0,0 +1,12 @@ +# Upgrading +## From v2 to v3 +### Removed unused Collections +This change should not have any impact on your code, but if you have a type hint for any of the following classes, make sure to remove it +- `Mollie\Api\Resources\OrganizationCollection` +- `Mollie\Api\Resources\RouteCollection` + + +### Removed deprecations +The following was removed due to a deprecation +- `Mollie\Api\Types\OrderStatus::REFUNDED` +- `Mollie\Api\Types\OrderLineStatus::REFUNDED` diff --git a/src/MollieApiClient.php b/src/MollieApiClient.php index 0c38f459e..ee5ce954e 100644 --- a/src/MollieApiClient.php +++ b/src/MollieApiClient.php @@ -263,7 +263,7 @@ public function setApiKey(string $apiKey): self { $apiKey = trim($apiKey); - if (! preg_match('/^(live|test)_\w{30,}$/', $apiKey)) { + if (!preg_match('/^(live|test)_\w{30,}$/', $apiKey)) { throw new ApiException("Invalid API key: '{$apiKey}'. An API key must start with 'test_' or 'live_' and must be at least 30 characters long."); } @@ -283,7 +283,7 @@ public function setAccessToken(string $accessToken): self { $accessToken = trim($accessToken); - if (! preg_match('/^access_\w+$/', $accessToken)) { + if (!preg_match('/^access_\w+$/', $accessToken)) { throw new ApiException("Invalid OAuth access token: '{$accessToken}'. An access token must start with 'access_'."); } diff --git a/src/Types/PaymentMethod.php b/src/Types/PaymentMethod.php index fb0f430b1..a20652c86 100644 --- a/src/Types/PaymentMethod.php +++ b/src/Types/PaymentMethod.php @@ -70,6 +70,7 @@ class PaymentMethod public const GIFTCARD = "giftcard"; /** + * @deprecated * @link https://www.mollie.com/en/payments/giropay */ public const GIROPAY = "giropay"; @@ -121,6 +122,11 @@ class PaymentMethod */ public const MYBANK = "mybank"; + /** + * @link https://www.mollie.com/en/payments/payconiq + */ + public const PAYCONIQ = "payconiq"; + /** * @link https://www.mollie.com/en/payments/paypal */ @@ -157,6 +163,11 @@ class PaymentMethod */ public const RIVERTY = "riverty"; + /** + * @link https://www.mollie.com/en/payments/trustly + */ + public const TRUSTLY = "trustly"; + /** * @link https://www.mollie.com/en/payments/twint */