Skip to main content
Estimated Upgrade Time: 15-30 minutes for most applications.

Requirements

Shopper 2.2 requires:
Laravel 10 is no longer supported. You must upgrade to Laravel 11 or 12 before upgrading to Shopper 2.2.

Updating Dependencies

Update your composer.json file to require Shopper 2.2:
Then run:
After updating Composer dependencies, run the migrations:

High Impact Changes

Repository Pattern Removed

Likelihood of Impact: High The Repository pattern has been completely removed in favor of a configurable Model Contract system. This is a breaking change if you were using repositories directly.

Before (v2.1)

After (v2.2)

The query() method automatically uses the configured model class from config/shopper/models.php.

Configuration: users Key Renamed to roles

Likelihood of Impact: High The users configuration key in config/shopper/core.php has been renamed to roles with updated sub-keys.

Before (v2.1)

After (v2.2)

Update your code references:

ShopperUser Interface & Trait

Likelihood of Impact: High The Shopper\Core\Models\User model has been removed. Your User model must now implement the ShopperUser interface and use the ShopperUser trait.

Before (v2.1)

After (v2.2)

The ShopperUser trait provides all the necessary methods: isAdmin(), isManager(), isVerified(), addresses(), orders(), and the customers/administrators scopes.

Filament v4 Upgrade

Likelihood of Impact: High Shopper v2.2 requires Filament v4.5. If you have customized any Filament components or forms, review the Filament v4 upgrade guide. Key changes affecting Shopper users:
  • Form schema syntax has been updated
  • Modal components have been replaced with Filament Actions
  • Table syntax has been updated

Medium Impact Changes

New Models in Configuration

Likelihood of Impact: Medium New models have been added to config/shopper/models.php: address, inventory, order, and supplier. If you have a published config/shopper/models.php, add these entries:

New Permissions

Likelihood of Impact: Medium New permissions have been added for reviews, product variants, and suppliers. These must be created in your database for existing installations. Create the permissions and assign them to your admin role:
You can run this code in a migration, a tinker session, or create the permissions directly from the admin UI in the Roles & Permissions settings page.
If you don’t create these permissions, users attempting to access Reviews, Product Variants, or Suppliers pages will encounter authorization errors.

Order Number Generator Configuration

Likelihood of Impact: Medium The order number generator configuration in config/shopper/orders.php has been updated with new options for more flexible number formatting.

Before (v2.1)

After (v2.2)

New options:
  • separator: character between each part of the number
  • date_format: PHP date format included in the number (set to null to disable)
  • prefix can now be set to null to disable
Examples of generated numbers depending on configuration:
  • Default (prefix => null) → 20250123-000001
  • With prefix (prefix => 'ORD') → ORD-20250123-000001
  • Without date (date_format => null) → 000001

Custom Modal Components Removed

Likelihood of Impact: Medium Several custom modal components have been removed and replaced with Filament Actions or slide-overs: If you have overridden these components, update your config/shopper/components/setting.php:

Custom Button Components Removed

Likelihood of Impact: Medium Custom button Blade components have been removed in favor of Filament’s button components:

Before (v2.1)

After (v2.2)

Card with Gray Heading Removed

Likelihood of Impact: Medium The <x-shopper::card-with-gray-heading> component has been removed. Use the standard <x-shopper::card> component or Filament’s Section component instead.

Low Impact Changes

Tailwind CSS v4

Likelihood of Impact: Low Shopper 2.2 uses Tailwind CSS v4. If you have custom CSS that extends Shopper’s styles, review the Tailwind v4 upgrade guide. The CSS architecture has been updated - if you’ve customized styles, you may need to update your imports.

PostgreSQL Support

Likelihood of Impact: Low Shopper 2.2 adds official PostgreSQL support. No action required for MySQL/MariaDB users. Likelihood of Impact: Low The admin sidebar has been redesigned with Alpine.js state management:
  • Collapsible sidebar with persistent state via localStorage
  • New submenu support with arrow indicators
  • Improved mobile responsiveness
If you have customized sidebar views, update them to use the new structure in resources/views/components/layouts/app/sidebar/.

SKU Uniqueness for Variants

Likelihood of Impact: Low Product variant SKUs now have a composite unique constraint scoped to product_id. This means:
  • SKUs must be unique within a product (not globally)
  • Auto-generated SKUs now use format: {PRODUCT_SKU}-{VARIANT_SLUG}
If you have custom variant creation logic, ensure SKUs are unique per product.

HasPrices Trait: New getPrice() Method

Likelihood of Impact: Low A new getPrice() method has been added to the HasPrices trait:
This method is now part of the Priceable contract.

Deprecations

The following features are deprecated and will be removed in v3.0:

Migration Checklist

1

Update requirements

Ensure your environment runs PHP ^8.3 and Laravel ^11.0 or ^12.0 before proceeding.
2

Update dependencies

Update shopper/framework to ^2.2 in composer.json, then run composer update -W.
3

Run migrations

Run php artisan migrate to apply all new migrations.
4

Rename `users` key to `roles` in config

In config/shopper/core.php, rename the users key to roles and update its sub-keys (admin_roleadmin, default_roleuser).
5

Add new models to configuration

In config/shopper/models.php, add the address, inventory, order, and supplier entries if you have a published config file.
6

Create new permissions

Run Permission::generate() for reviews, product_variants, and suppliers, then assign the generated permissions to the administrator role.
7

Update order number generator configuration

In config/shopper/orders.php, update the generator array to include the new separator and date_format keys.
8

Update User model

Replace extends ShopperUser with implements ShopperUserContract and add use ShopperUser in your App\Models\User class.
9

Replace repository usage

Replace all direct repository class usage with model contracts resolved via resolve(ContractClass::class) or direct model queries.
10

Update custom Blade components

Replace <x-shopper::buttons.*> with the equivalent <x-filament::button> variants. Update any overridden modal components to their slide-over replacements.
11

Clear caches

Run php artisan optimize:clear.