Skip to content

Product that is Published throws TypeError when applying customer group scope #2524

Description

@kevinjbecker
  • Lunar version: 1.5.0-beta.6
  • Laravel Version: 13.17.0
  • PHP Version: 8.5.7
  • Database Driver & Version: PostgreSQL 18.4

Expected Behaviour:

Product edit page shown.

Actual Behaviour:

TypeError thrown. See error below:

TypeError
vendor/lunarphp/core/src/Base/Traits/HasCustomerGroups.php:97

Lunar\Models\Product::applyCustomerGroupScope(): Argument ##3 ($startsAt) must be of type DateTime, Carbon\CarbonImmutable given, called in /var/www/html/vendor/lunarphp/core/src/Base/Traits/HasCustomerGroups.php on line 151

Steps To Reproduce:

  1. Create new Laravel project via laravel/installer composer package.
  2. Install Lunar pinned to 1.5.0-beta.6
  3. Complete Lunar setup (publish configs, run migrations, create first Staff, seed locations data, etc.)
  4. Create a new Product.
  5. Change Product status to Published.
  6. Error is thrown every time the EditProduct page is shown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions