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.
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_periodis currently a single setting (default'3 years', ornullto 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/GiftCardFactoryand 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/Configurationwould need the scalar to accept a per-channel map as well as a single valueFactory/GiftCardFactory::resolveExpiresAt()takes the period from a constructor argument today; it would resolve per channel increateForChannel()Note that gift card expiry is regulated in several jurisdictions, so the config should make "never expires" easy to keep.