Skip to content

Commit

Permalink
add UPGRADING guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Naoray committed Jul 16, 2024
2 parents 7e45e92 + 588b4b3 commit 9258b45
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Expand Down
12 changes: 12 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -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`
4 changes: 2 additions & 2 deletions src/MollieApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}

Expand All @@ -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_'.");
}

Expand Down
11 changes: 11 additions & 0 deletions src/Types/PaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class PaymentMethod
public const GIFTCARD = "giftcard";

/**
* @deprecated
* @link https://www.mollie.com/en/payments/giropay
*/
public const GIROPAY = "giropay";
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down

0 comments on commit 9258b45

Please sign in to comment.