Lunar 1.5 moves its admin panel to Filament 4

2 hours ago

Lunar 1.5 is the stable release after the 1.5 betas, and for anyone on 1.4 it moves the floor. It needs PHP 8.3, Laravel 12 or 13, and Filament 4 for the admin panel. That Filament move is most of the upgrade work.

Ask about this presentation

Chapters

  1. 0:00Lunar 1.5 moves to Filament 4
  2. 0:18What's new
  3. 0:41Checkout fixes that change totals
  4. 1:10What you have to change
  5. 1:12New requirements
  6. 1:32Migrating panel extensions
  7. 1:51Renamed columns and namespaces
  8. 2:14Shipping lines and purchasable
  9. 2:34How to upgrade
Show transcript
  1. Lunar 1.5 is the stable release after the 1.5 betas, and for anyone on 1.4 it moves the floor. It needs PHP 8.3, Laravel 12 or 13, and Filament 4 for the admin panel. That Filament move is most of the upgrade work.

    Slide text
    Lunar
    1.4 → 1.5.0

    Lunar 1.5 moves its admin panel to Filament 4

    The stable release after the 1.5 betas, and a new floor for every store on 1.4.

    PHP 8.3+ Laravel 12 | 13 Filament 4
  2. Start with what's new. Table rate shipping gains a discount type for shipping, as a fixed price per currency or a percentage off, plus base prices in every currency and optional weight limits on each method. Core ships a Lunar skill for Laravel Boost, PostgreSQL gets a fixed line order, and the admin panel adds Arabic, Bulgarian, Persian, Croatian and Mongolian.

    Slide text
    Lunar
    1.4 → 1.5.0

    Shipping gets discounts and weight limits

    TABLE RATE SHIPPING

    Shipping discounts

    Fixed price per currency, or a percentage off

    TABLE RATE SHIPPING

    Base price per currency

    Every currency, not just the default

    TABLE RATE SHIPPING

    Min and max weight

    Optional limits on each method

    CORE

    Laravel Boost skill

    Teaches your coding agent Lunar

    CORE

    PostgreSQL ordering

    Cart and order lines in a fixed order

    ADMIN

    Five new languages

    Arabic, Bulgarian, Persian, Croatian, Mongolian

  3. Four fixes change what a customer pays, so check them against your live store. Buy X Get Y discounts now enforce their conditions, like a minimum spend. Stripe amounts follow the currency's decimal places; a currency set to four places was charged a hundred times too much. Weight tiers use the method's own unit, so re-enter thresholds on any method not in kilograms. And state tax zones match only inside their country, since WA is both Washington and Western Australia.

    Slide text
    Lunar
    1.4 → 1.5.0

    Four fixes change what a customer pays

    Buy X Get Y

    Now enforces minimum spend, customer restrictions and max uses per user

    Stripe amounts

    Scaled by the currency's decimal places. A 4-place currency was charged 100×.

    Weight tiers

    Read in the method's weight_unit, no longer always kg

    State tax zones

    Matched inside the address country only. WA is Washington and Western Australia.

  4. Now, what you have to change.

    Slide text
    Lunar
    Requirements Filament Renames Order lines
    PART 2
  5. Raise your app's own requirements before you update Lunar. Move to PHP 8.3, Laravel 12 or 13, and Filament 4.1. The forked two-factor package that Lunar 1.3 asked you to install is no longer required, because Filament 4 ships its own multi-factor authentication.

    Slide text
    Lunar
    Requirements Filament Renames Order lines

    Raise your app to PHP 8.3 and Laravel 12 first

    composer.json
    "require": {-   "php": "^8.2",+   "php": "^8.3",-   "laravel/framework": "^11.0",+   "laravel/framework": "^12.0|^13.0",-   "filament/filament": "^3.0",+   "filament/filament": "^4.1",}

    lunarphp/filament3-2fa

    No longer required. Filament 4 ships its own multi-factor authentication.

  6. If you built your own resources, pages, widgets or actions on the admin panel, they need the Filament 4 APIs. Filament's upgrade tool helps with the rewrite. Forms take a schema, actions move under Filament Actions, and layout pieces like Section and Group move to schema components.

    Slide text
    Lunar
    Requirements Filament Renames Order lines

    Extended the panel? Run Filament's upgrade tool

    terminal
    composer require filament/upgrade:^4.0 -W --devvendor/bin/filament-v4
    Forms Filament\Schemas\Schema
    EditAction, DeleteBulkAction Filament\Actions
    Section, Group, Get Filament\Schemas\Components
  7. Two renames reach into your own code. A migration renames the staff table's two-factor columns to app authentication columns and drops the confirmed-at timestamp, so update any code that names the old ones. Collections now use Lunar's own fork of the nested set package, so imports from the Kalnoy namespace move to Lunar's. Tree queries work as before.

    Slide text
    Lunar
    Requirements Filament Renames Order lines

    Search your code for the old names

    Staff table

    Renamed by a Lunar migration

    two_factor_secret
    app_authentication_secret
    two_factor_recovery_codes
    app_authentication_recovery_codes
    two_factor_confirmed_at
    dropped

    Nested set imports

    kalnoy/nestedset → lunarphp/nestedset

    Kalnoy\Nestedset\NodeTrait
    Lunar\Nestedset\NodeTrait
    Kalnoy\Nestedset\QueryBuilder
    Lunar\Nestedset\QueryBuilder
    whereIsRoot(), appendNode(), withDepth() unchanged
  8. Shipping lines used to store a placeholder purchasable, and reading it threw a fatal error. Now it's null. Storefront loops should skip those lines, or loop over product lines instead. The cutoff column on shipping methods is also gone. An availability schedule replaces it, and existing cutoffs are copied across.

    Slide text
    Lunar
    Requirements Filament Renames Order lines

    Shipping lines now return null for purchasable

    $order->shippingLines->first()->purchasable

    1.4 fatal error
    1.5 null

    Or loop over $order->productLines to skip shipping entirely.

    foreach ($order->lines as $line) {    if (! $line->purchasable) {        continue; // Shipping line    }    // ...}
    Also removed: shipping_methods.cutoff. An availability schedule replaces it, and existing cutoffs are copied across.
  9. To upgrade, back up the database and try it on staging first. Update Lunar, run the migrations, and clear cached config and views. If your panel extensions can't move to Filament 4 yet, stay on 1.4, the last line on Filament 3. The upgrade guide in Lunar's docs lists every change. That's Lunar 1.5, with the admin panel on Filament 4.

    Slide text
    Lunar
    1.4 → 1.5.0

    Back up, try it on staging, then run three commands

    terminal
    composer update lunarphp/lunarphp artisan migratephp artisan optimize:clear

    Stay on 1.4 if…

    your panel extensions can't move to Filament 4 yet. 1.4 is the last line built on Filament 3.

    Full upgrade guide · docs.lunarphp.com/1.x/getting-started/overview/upgrade-guide

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️