Upgrade
Upgrading from the Pre-release version 0.x to the version 1.x LTS.
High Impact Changes
Updating dependencies
PHP version
PHP 7.4 or higher is required along with extensions json and openssl.
Composer Dependencies
You need to use the latest version of the package.
composer require imdhemy/laravel-purchases
Service Providers
The Imdhemy\Purchases\ServiceProvider was removed, and replaced by Imdhemy\Purchases\ServiceProviders\LiapServiceProvider.
Configuration
The old configuration file purchase.php is replaced with liap.php. You need to publish the new configuration file.
php artisan liap:config:publish
Routes
The old routes for Google Play and App Store are replaced with new ones. You can use the following command to show them.
php artisan liap:url
Find more information about the new routing here.
Value Objects
The App store value object class ReceiptInfo if replaced with LatesReceiptInfo.
Public constants in Google Play removed
DeveloperNotificationall constants are removed.OneTimePurchaseNotificationtheONE_TIME_PRODUCT_CANCELEDconstant is removed.CURRENCY_CODESSconstant is removed from thePricevalue object class.
Medium Impact Changes
Return data types
- The acknowledge method in
GooglePlayandAppStorereturn type is changed fromvoidtoEmptyResponse.
Removed classes
If your code uses any of the following classes, you need to use getter methods and public constants instead.
- The class
Imdhemy\GooglePlay\Subscriptions\Subscriptionis replaced byImdhemy\GooglePlay\Subscriptions\SubscriptionClient. - The class
AcknowledgmentStateis removed. - The class
CancelReasonis removed. - The class
CancelSurveyReasonis removed. - The class
ConsumptionStateis removed. - The class
PriceChangeStateis removed. - The class
PromotionTypeis removed. - The class
PurchaseStateis removed. - The class
PurchaseTypeis removed.