roundly-consulting/refresh-tokens-for-laravel
Add secure refresh token authentication to your Laravel app. Issue, rotate, and revoke tokens through a simple API that fits your existing auth flow, so users stay signed in without exposing long-lived access tokens.
Architecture fit: This package owns Eloquent models and ships factories for them. Release 1.1.3 confirms a deliberate extension point: hosts can swap the package's model for their own subclass or replacement, and the package resolves the configured model at runtime. That is a sound Laravel pattern — configuration/container binding over hard-coded class references — and it means the package is designed for host application customization rather than remaining hermetic. For a TPM, this is a positive signal: the package anticipates real-world override needs, and the maintainers are actively closing gaps in that contract.
Integration feasibility: High. This is a patch release with no new public API surface described, no migrations, and no configuration changes. The change is confined to factory model resolution. Integration effort is effectively a Composer version bump plus a test run. The only hosts that need to pay attention are those that actually swap models; everyone else sees no behavioral change.
Technical risk: Low, but non-zero for a specific cohort. The fix changes which class factories instantiate when a model swap is configured. Any host whose tests or seeders depended on the previous (arguably incorrect) behavior — factories building the package's default model even after a swap — could see different objects, different table names, different relationships, or different fillable/casts behavior in test output. That is the intended correction, but it can surface as failing tests or subtly different fixtures. Risk concentrates in test environments; production runtime is largely unaffected because factories are typically dev/test-only.
Key questions:
newFactory(), factory() on the model, relationship factories, and HasFactory::factory() resolution?Stack fit: Standard Laravel package shape — Composer-installed, service provider, config publish, Eloquent models with HasFactory. The model-swap behavior suggests the package resolves models through configuration or the container rather than new static, which composes cleanly with Laravel's testing conventions. No conflict with typical host application architecture is apparent.
Migration path: Treat as a routine patch upgrade: bump to ^1.1.3 (or 1.1.3 if pinned), run composer update, and execute the full test suite. No database migrations, no config republication required, no code changes expected. Hosts that swap models should specifically re-run tests touching factories, seeders, and any test that asserts on model class, table, or relationship behavior.
Compatibility: Backward compatible at the API level; behaviorally a correction. The compatibility surface to check is internal to test code, not production code. Confirm the package's declared Laravel/PHP constraints match the host; a patch release should not narrow them, but verify since this is the first assessment on record.
Sequencing:
Maintenance: Minimal. Patch release, small blast radius, no deprecations and no breaking changes announced. The main ongoing cost is keeping the model-swap contract documented so future upgrades can be evaluated against it.
Support: This release should reduce support load. "Factories build the wrong model after swapping" is a confusing failure mode that generates hard-to-diagnose test failures; fixing it removes a class of tickets. Support should be prepared for a short tail of hosts reporting newly failing tests, with the correct guidance being "your tests were asserting the old, incorrect resolution."
Scaling: No meaningful impact. Factory resolution is a test-time concern and does not touch request-path performance, query behavior, or queue throughput.
Failure modes:
HasFactory or a correctly named factory, causing resolution to break where it previously fell through to the package default.Ramp-up: Very low for the upgrade itself. For engineers new to the package, the important concept to learn is the model-swap contract — where it is configured, what a swapped model must implement, and how factories resolve it. That is a short document, but it should exist; this release is evidence that the contract is real and load-bearing.
How can I help you explore Laravel packages today?