laravel-shop/tests
Fabian @ Blax Software 96b9a19287 feat(fulfillment): add model-agnostic PurchaseCompleted event
Introduce a first-class PurchaseCompleted lifecycle event so host apps can run
fulfillment (grant access, send receipts, provision licences) without coupling
to the ProductAction table or to a concrete purchasable model. It fires when a
purchase is created already-COMPLETED and when one transitions into COMPLETED,
and is transition-guarded so it does not re-fire on unrelated saves of an
already-completed purchase.

Also generalise the built-in ProductAction fulfillment in ProductPurchase:
the actionable product is now resolved via config('shop.models.product') /
'...product_price' (instead of a hard instanceof the bundled Product), and
callActions() is only invoked when the resolved product exposes it — so apps
overriding the models, or using IsSimplePurchasable host models, complete
cleanly. Existing behaviour for the bundled Product is unchanged.

Adds 4 EventsWiredUpTest cases; full suite 1404 green. Docs + README updated.
2026-06-02 11:19:21 +02:00
..
Feature feat(fulfillment): add model-agnostic PurchaseCompleted event 2026-06-02 11:19:21 +02:00
Unit test: pin clock in loan-vocabulary test; docs: bump suite counts to 1400/3755 2026-06-02 09:48:26 +02:00
TestCase.php IAM "max usage" feature 2026-05-19 14:01:52 +02:00
bootstrap.php I tests & structure 2025-11-29 12:05:02 +01:00