v1.0.0-beta
Pre-release
Pre-release
First public beta of Tashil — subscription + feature management for Laravel.
Tashil owns the plan catalog, subscription state, feature gating, atomic usage counters, trial lifecycle, invoice issuance, and the activate → renew → dunning → reactivate state machine with proration on in-place plan changes. It does not move money — payment capture, dunning retry charges, refunds, gateway sync, and wallet balances are delegated to the host app.
Highlights
- Plan catalog — fluent builders; 5 feature types (Boolean, Limit, Consumable, Enum, Metered).
- Lifecycle — subscribe, grace/immediate cancel, resume, pause (banks time),
switchPlan, in-place proratedchangePlan, deferredscheduleDowngrade. - Activation gating — priced plans start
Pending(no access) →activate()on first paid invoice; free plans go straightActive. - Trials — strict
isOnTrial(), host-triggeredconvertTrial()anchoring the first paid period, scheduled warning/expiry jobs. - Dunning — bounded
Active → PastDue → Suspended → Expiredstate machine (host performs the charge). - Atomic usage — conditional-UPDATE limit increments (no over-limit races), absolute
reportStorage, once-per-period 80% warning, period-anchored resets. - Metered billing — per-unit charges via host
MeteredBilling(self-impl or container), charge-before-write, caller-supplied idempotency keys. - Immutable event log — monotonic per-subscription
sequence_numunder row lock, idempotency keys, paginated read API. - Analytics — MRR, churn rate + trend, trial conversion, revenue, dashboard (cross-DB, no raw SQL).
- Subscribable trait + middleware + Blade directives with one overridable resolver.
- Six idempotent scheduled commands, auto-registered, version-agnostic across Laravel 10–13.
Requirements
- PHP 8.2 – 8.5
- Laravel 10.x / 11.x / 12.x / 13.x
- Redis (optional, only with the caching layer)
Install
```bash
composer require foysal50x/tashil:^1.0.0-beta
```
Quality
363 tests / 1067 assertions, green on SQLite, MySQL 8, and PostgreSQL 16.
Beta: the public API is feature-complete but subject to refinement before `1.0.0` stable.
See the CHANGELOG for the full list.