Skip to content

[Feature request]: Per-channel default validity periods #271

Description

@loevgaard

Describe the proposed solution

Allow the default validity period to differ per channel, instead of one global value for the whole installation.

setono_sylius_gift_card.default_validity_period is currently a single setting (default '3 years', or null to never expire). Multi-channel stores selling into different markets often need different expiry rules, sometimes for legal reasons.

Describe alternatives you've considered

A host application can already override Factory/GiftCardFactory and compute the expiry itself, so this is about making the common case configurable rather than enabling something impossible.

Additional context

Deferred during the 1.x rewrite (#269) — see the roadmap in REWRITE.md.

Where it would land:

  • DependencyInjection/Configuration would need the scalar to accept a per-channel map as well as a single value
  • Factory/GiftCardFactory::resolveExpiresAt() takes the period from a constructor argument today; it would resolve per channel in createForChannel()

Note that gift card expiry is regulated in several jurisdictions, so the config should make "never expires" easy to keep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions