Upgrade
You can upgrade Sitemapamic using composer - it's as easy as that.
For major versions, you will need to manually increment version numbers as these may include breaking changes and may need some additional changes to your code.
3.x to 4.x
v3 drops support for Statamic 5.
Update the following dependencies in your site's composer.json file:
mitydigital/sitemapamicto^4.0
This update introduces some ⚠️ breaking changes ⚠️ when coming from v3:
new configuration file structure - you will need to update your config file
new Blade templates - you will need to re-publish and update your templates
changed
SitemapamicUrlmodel
New configuration file
Take a backup of your config/sitemapamic.php config file from v3.
Then publish Sitemapamic's new config file as a starting point:
1php artisan vendor:publish --tag=sitemapamic-config
Make yourself familiar with Sitemapamic's new configuration options, especially related to defaults and auto-discovery.
New blade templates
v3 of Sitemapamic had all-in-one Blade templates for outputting your sitemaps. This was require to help with the streaming behaviour of v4 to help with performance over large sites.
If you have not published these, there is nothing to do.
If you have, take a backup of your existing views, then publish the new ones:
1php artisan vendor:publish --tag=sitemapamic-views
You are then free to apply your updates to the new views to meet your needs.
Changed SitemapamicUrl model
The SitemapamicUrl model has been changed.
Review the SitemapamicUrl model docs for full details.