Estimated Upgrade Time: 15-30 minutes for most applications.
Requirements
Shopper 2.2 requires:| Dependency | Version |
|---|---|
| PHP | ^8.3 |
| Laravel | ^11.0 | ^12.0 |
| Filament | ^4.5 |
| Livewire | ^3.6 |
| Tailwind CSS | ^4.1 |
Updating Dependencies
Update yourcomposer.json file to require Shopper 2.2:
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)
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)
ShopperUser Interface & Trait
Likelihood of Impact: High TheShopper\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 toconfig/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:Order Number Generator Configuration
Likelihood of Impact: Medium The order number generator configuration inconfig/shopper/orders.php has been updated with new options for more flexible number formatting.
Before (v2.1)
After (v2.2)
separator: character between each part of the numberdate_format: PHP date format included in the number (set tonullto disable)prefixcan now be set tonullto disable
- 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:| Removed Component | Replacement |
|---|---|
Modals\CreatePermission | Integrated into parent component |
Modals\CreateRole | Integrated into parent component |
Modals\ConfirmPassword | Filament Action |
Modals\LogoutOthersBrowser | Filament Action |
Modals\PaymentMethodForm | Slide-over |
Modals\CollectionProductsList | SlideOvers\CollectionProductsList |
Modals\RelatedProductsList | SlideOvers\RelatedProductsList |
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:| Removed Component | Replacement |
|---|---|
<x-shopper::buttons.primary> | <x-filament::button> |
<x-shopper::buttons.default> | <x-filament::button color="gray"> |
<x-shopper::buttons.danger> | <x-filament::button color="danger"> |
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.Sidebar Redesign
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
resources/views/components/layouts/app/sidebar/.
SKU Uniqueness for Variants
Likelihood of Impact: Low Product variant SKUs now have a composite unique constraint scoped toproduct_id. This means:
- SKUs must be unique within a product (not globally)
- Auto-generated SKUs now use format:
{PRODUCT_SKU}-{VARIANT_SLUG}
HasPrices Trait: New getPrice() Method
Likelihood of Impact: Low
A new getPrice() method has been added to the HasPrices trait:
Priceable contract.
Deprecations
The following features are deprecated and will be removed in v3.0:| Deprecated | Replacement |
|---|---|
| Repository classes | Model contracts with resolvedQuery() |
config('shopper.core.users.*') | config('shopper.core.roles.*') |
Migration Checklist
Update requirements
Ensure your environment runs PHP ^8.3 and Laravel ^11.0 or ^12.0 before proceeding.
Rename `users` key to `roles` in config
In
config/shopper/core.php, rename the users key to roles and update its sub-keys (admin_role → admin, default_role → user).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.Create new permissions
Run
Permission::generate() for reviews, product_variants, and suppliers, then assign the generated permissions to the administrator role.Update order number generator configuration
In
config/shopper/orders.php, update the generator array to include the new separator and date_format keys.Update User model
Replace
extends ShopperUser with implements ShopperUserContract and add use ShopperUser in your App\Models\User class.Replace repository usage
Replace all direct repository class usage with model contracts resolved via
resolve(ContractClass::class) or direct model queries.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.