To get started with the upgrade process, follow the below steps:
1. In your composer.json file, update the doublethreedigital/simple-commerce version constraint:
"doublethreedigital/simple-commerce": "^4.0""doublethreedigital/simple-commerce": "^4.0"
2. Then run:
composer update doublethreedigital/simple-commerce --with-dependenciescomposer update doublethreedigital/simple-commerce --with-dependencies
3. You may also want to clear your route & view caches:
php artisan route:clearphp artisan view:clearphp artisan route:clearphp artisan view:clear
4. Simple Commerce will have attempted upgrading some things for you (config changes, blueprint updates, etc). However, it's possible you will need to make some manual changes, along with some testing. Please test before you push to production!
Simple Commerce has dropped support for both PHP 8.0 and Laravel 8. Leaving PHP 8.1 and Laravel 9 the only current versions supported.
These versions have been dropped to allow for Simple Commerce to take advantage of new PHP & Laravel features like proper Enums & Named Parameters.
To upgrade to Laravel 9, you should follow the steps outlined in the official Upgrade Guide or use a service like Laravel Shift to automate most of the process for you.
Previously, coupons were stored as collection entries. However, they've now been moved into their own Stache 'thing' to give Simple Commerce greater power over how they work.
All of your existing coupons should be migrated over automatically during the upgrade process. If this hasn't happened, follow these steps:
content/simple-commerce/couponscontent/collections/coupons.md to .yamlcoupon_value to value and remove title.code: your-coupon-codecode: your-coupon-code
coupons array from the content array inside your Simple Commerce config file.If you're interacting with the Coupons API directly (eg. with PHP code), you shouldn't be required to make any changes. If you do end up needing to make some, please open an issue so this guide can be updated.