laravel-shop/tests/Feature
Fabian @ Blax Software b154d8fea2 feat(seats): assignable license seats — buy N, assign/reassign/reclaim per user
A seat-based product (meta.seat_based) sold at quantity N provisions N
assignable LicenseSeat rows instead of granting the buyer. Assigning a seat
runs the product's existing ProductAction grants against the seat holder via
an explicit `grantee` (resolution: grantee ?? purchaser ?? subscription->user),
so a seat confers exactly the product's access with zero duplicated grant logic.

- LicenseSeat model: assign / reassign / reclaim / retire / refreshGrant
- SeatService: idempotent provisioning for one-time purchases and subscriptions
  (sizes the pool to quantity; renewal extends expiry + re-grants held seats)
- SeatAssigned / SeatReassigned / SeatRevoked events
- Product::isSeatBased(); ProductPurchase + Subscription provision on
  completion / lifecycle hooks
- license_seats migration + factory; config `shop.seats` block
- 15 new tests (purchase, subscription, renewal, retire, delegation, gating)

Backward compatible: with no `grantee` the buyer grant is unchanged, and seat
behavior is gated behind the per-product meta flag + config `shop.seats.enabled`.
Full package suite green: 1425 tests / 3812 assertions / 0 failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-29 10:07:58 +02:00
..
Booking BF edgecases, R structure, A tests 2026-05-18 13:05:38 +02:00
Cart IAM "max usage" feature 2026-05-19 14:01:52 +02:00
Checkout feat(enums): add SERVICE product type; fix flaky multi-product checkout test 2026-06-03 09:49:12 +02:00
Http BF edgecases, R structure, A tests 2026-05-18 13:05:38 +02:00
Loan R loan purchase to physical loan, A physical loan stuff 2026-05-17 15:20:58 +02:00
Pool feat: Enhance traits with strict types and improve method signatures 2026-05-15 20:26:24 +02:00
Pricing I loanable product type, tiered pricing, lifecycle events, host helpers 2026-05-15 10:27:59 +02:00
Product R loan purchase to physical loan, A physical loan stuff 2026-05-17 15:20:58 +02:00
ProductionBugs BF pool cart bug, R structure 2025-12-30 10:55:06 +01:00
Seats feat(seats): assignable license seats — buy N, assign/reassign/reclaim per user 2026-07-29 10:07:58 +02:00
ShopServiceProvider I loanable product type, tiered pricing, lifecycle events, host helpers 2026-05-15 10:27:59 +02:00
Stripe BF pool cart bug, R structure 2025-12-30 10:55:06 +01:00
Subscriptions fix(subscriptions): grant every product in a multi-item (bundle) subscription 2026-06-09 19:29:14 +02:00
CommandActionsTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandAvailabilityTest.php A events, IA commands 2026-05-17 11:24:43 +02:00
CommandCleanupCartsTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandListProductsTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandListPurchasesTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandListTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandProductExamplesTest.php BFI cart single item 2025-12-24 19:40:10 +01:00
CommandReinstallTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandReleaseExpiredStocksTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandStatsTest.php BFI commands, A test 2026-05-17 14:09:03 +02:00
CommandStocksTest.php A events, IA commands 2026-05-17 11:24:43 +02:00
EventsWiredUpTest.php feat(fulfillment): add model-agnostic PurchaseCompleted event 2026-06-02 11:19:21 +02:00
GetHasMoreAttributeTest.php BFRI cart 2025-12-28 11:12:58 +01:00
HasShoppingCapabilitiesTest.php BFI cart / orders 2026-01-05 10:30:21 +01:00
NextAvailableAtTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
ShopFacadeTest.php BFI cart single item 2025-12-24 19:40:10 +01:00