github shopperlabs/shopper v3.0.0-rc.4

pre-release47 minutes ago

Important

This is the fourth release candidate of Shopper 3.0. It repairs the caches Laravel 13 could no longer read back, keys search documents by the public id the Store API exposes, and fixes the theme and icon picker clicks broken in rc.3. Rebuild your search indexes after updating.

Installation

"minimum-stability": "RC",
"prefer-stable": true
composer require shopper/framework:^3.0.0-rc

Bug Fixes

  • fix: keep search indexes in sync and make sidebar groups accessible (#683)

Search documents of models with a public id are keyed by public_id instead of the auto-increment id, so a hit maps to the id the Store API exposes. Product documents leave out hidden categories (disabled, or under a disabled parent) and disabled brands, and list the public ids of their channels in a new channels field. Renaming, disabling or moving a category reindexes its subtree and their products, a brand change reindexes its products, and variant SKUs reach the product document. Reindexing runs after the transaction commits, so a rollback leaves the index untouched.

Laravel 13 refuses to unserialize cached objects unless cache.serializable_classes lists them, which broke every cache that stored models (#682). The zone and channel resolvers, tax zones, shipping quotes, active webhook subscriptions and the dashboard top products now cache plain attributes and hydrate the models on read. On Laravel 13, webhooks were skipped with a "Webhook fan-out failed." log entry until this release.

The sidebar cache works again: the static resolver can be selected, both resolvers cache the serialized sidebar, each locale gets its own copy, and the user-based cache keys on the guard the request authenticated with. Collapsible group headings are buttons with aria-expanded, items stay visible while the sidebar is collapsed to icons, and the open and close labels are translated.

  • fix(admin): repair the theme and icon picker clicks and smooth the sidebar collapse (#684)

Since rc.3, clicking a theme in the theme switcher or a set filter in the icon picker threw Alpine Expression Error: unexpected token: identifier. Both work again. Collapsing the sidebar no longer pushes the icons to the middle before the width shrinks, and labels fade out and truncate instead of wrapping during the animation.

Breaking Changes

  • The id of a search hit is the model's public id (ULID). Code that loads hits by primary key must look them up by public_id, and a custom indexer must put $this->getScoutKey($model) in id.
  • Categories under a disabled parent are no longer searchable, and product documents no longer list them.
  • Shopper\Sidebar\Domain\DefaultAppend::getClass() returns ?string.
  • A published top-selling-products dashboard view must read $item['name'] and $item['thumbnail'] instead of $item['product'].

Upgrading

composer update "shopper/*"
php artisan scout:delete-index <index>
php artisan scout:import "<Model>"

Run scout:delete-index then scout:import for each searchable model: Meilisearch keeps the primary key of an existing index, so scout:flush is not enough. To filter on channels, add it to the filterable attributes of the products index (scout.meilisearch.index-settings), then run php artisan scout:sync-index-settings.

Moving a category to another parent in the reorder panel rebuilds its slug with the new parent prefix, as the edit form does. Reordering under the same parent leaves the slug alone.

The zone, channel, tax zone, shipping quote and webhook cache keys changed, so entries written by rc.3 are never read back and expire on their own. If you set shopper.http.zone.cache_ttl or shopper.http.channel.cache_ttl to 0 to get around #682, you can restore them.

sidebar.cache.duration is read in minutes: the default 1440 keeps the sidebar for a day where it used to expire after 24 minutes. A null duration keeps it until SidebarManager::flush() runs.

The npm packages (@shopperlabs/shopper-sdk, @shopperlabs/shopper-types) have no changes in this release.

Contributors

@mckenziearts

Full Changelog: v3.0.0-rc.3...v3.0.0-rc.4

Don't miss a new shopper release

NewReleases is sending notifications on new releases.