Skip to content

Add PHPStan, switch to PHPUnit, update for API SDK resources#7

Merged
sandervanhooft merged 10 commits intomainfrom
larafast_dev_sprint
Feb 27, 2026
Merged

Add PHPStan, switch to PHPUnit, update for API SDK resources#7
sandervanhooft merged 10 commits intomainfrom
larafast_dev_sprint

Conversation

@sandervanhooft
Copy link
Copy Markdown
Member

@sandervanhooft sandervanhooft commented Feb 27, 2026

Breaking Changes ⚠️

Namespace Migration

Import contracts from Laravel namespace (recommended) or Fluent namespace:

// Before
use Vatly\Contracts\BillableInterface;

// After (recommended for Laravel users)
use Vatly\Laravel\Contracts\BillableInterface;

// Or use Fluent directly
use Vatly\Fluent\Contracts\BillableInterface;

Interface Changes (inherited from vatly-fluent-php)

  • BillableInterface::getKey() return type: string|intmixed
  • BillableInterface::save() return type: voidmixed
  • BillableInterface::getMorphClass() removed

New Laravel Wrapper Interfaces

  • Vatly\Laravel\Contracts\BillableInterface extends Fluent interface
  • Allows Laravel users to import only from Vatly\Laravel namespace

Other Changes

  • Switched test framework from Pest to PHPUnit
  • Added PHPStan with strict type checking
  • Updated models to work with API SDK resources directly

Migration Guide

  1. Update use statements to new namespace
  2. If implementing BillableInterface directly, update method signatures
  3. Requires vatly/vatly-fluent-php from same release

Part of Larafast dev sprint.

ClawdBot added 10 commits February 27, 2026 11:13
- Remove baseline (all 87 errors fixed)
- Add Vatly\Laravel\Contracts\BillableInterface (wraps Fluent)
- Add Laravel event wrappers (SubscriptionStarted, etc.)
- Update docs to use Laravel namespace only
- Add proper type hints throughout
- Users no longer need to import Vatly\Fluent namespace
- ManagesCustomer now returns Customer instead of Fluent response DTOs
- Subscription model uses correct API SDK property names (href, subscriptionPlanId, trialUntil)
- Updated tests to mock API SDK resources
- User fixture updated for BillableInterface::save() return type
@sandervanhooft sandervanhooft merged commit de4fdde into main Feb 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant