Update composer.json
to match this:
"require": {
"mollie/laravel-mollie": "^3.0"
}
Then run composer update mollie/laravel-mollie
.
Laravel-Mollie now requires PHP 8.1.0 or greater.
If you are using the mollie connect feature, make sure to checkout the upgrade instructions for Laravel-Socialite
The Laravel team has added a note a while ago on the Lumen Repository as well as the official Lumen documentation that they discourage starting a new project with Lumen. Therefore we dropped the Lumen support for this package.
In order to enhance maintainability the following class was removed:
MollieApiWrapper
Instead the MollieApiClient
is now directly resolved and provided through the container without any abstractions. This change means you can directly access the newest API features that are added to the underlying mollie/mollie-api-php client without having to wait on this repository being updated.
Earlier versions of Laravel-Mollie provided access to endpoints via both methods and properties. Moving forward, access to endpoints will be exclusively through properties, aligning with the practices of the mollie-api-php SDK.****
// before
Mollie::api()->payments()->create();
// now
Mollie::api()->payments->create();
The mollie()
helper function was deleted. If you rely on the helper function, either consider switching to
- injecting or resolving the
MollieApiClient
from the container, or - use the
Mollie
facade
If none of these are an option for you, you can create your own helpers.php
file and insert the code for the mollie()
function yourself.
// app/helpers.php
<?php
use \Mollie\Api\MollieApiClient;
if (! function_exists('mollie')) {
/**
* @return MollieApiClient
*/
function mollie()
{
return resolve(MollieApiClient::class);
}
}
Feel free to open an issue.