zareismail/maintainable
zareismail/maintainable is a Laravel package that provides maintenance-related helpers for PHP applications, making it easier to manage maintenance states and workflows with simple configuration and familiar Laravel conventions.
Architecture fit
Small, single-purpose Laravel package built around Eloquent models, a maintainable morph relation, and gate/policy-based authorization. Release 0.5.0 tightens the authorization surface: it removes the implicit "view any" check, adds a morphs helper for the polymorphic relation, resolves access through the owning maintainable resource, and gates the settle up action behind a dedicated permission. This fits Laravel applications that need issue/ticket-style records attached to parent resources, but it is an opinionated fit — the package assumes your authorization is expressed as permissions rather than ad-hoc role checks.
Integration feasibility Straightforward Composer install with a service provider, config publish, and migrations. Real work is on the consumer side: registering the trait on models, defining the morph map, and seeding the new settle-up permission. The morphs helper reduces boilerplate for the polymorphic side, which is a net reduction in integration effort. Expect roughly a day of work for a small team including test coverage.
Technical risk
This is a 0.x release and 0.5.0 contains two behavior-changing items: dropping the view any check and adding authorization to settle up. Both can silently revoke access that worked in 0.4.x. There is no published upgrade guide, no deprecation window, and the changelog entries are one line each — insufficient to reason about edge cases. Permission cache staleness after deploy is a realistic production hazard.
Key questions
settle up now require, and is it seeded automatically or left to the host app?morphs helper opt-in, and does it collide with an existing morphMap registration?Stack fit Assumes a modern Laravel (8+) and PHP 8.x runtime with a permission layer — most likely spatie/laravel-permission given the "view any permission" phrasing. Applications using pure Gate/Policy authorization without a permission package may not get value from the new checks without an adapter.
Migration path
Pin to 0.4.x as a rollback point, upgrade in a branch, run composer update, republish config if the provider exposes new options, clear the permission cache, then seed/reconcile the settle-up permission across roles. Diff the package's authorization code path against your existing policies before merging.
Compatibility
The two behavioral changes are the compatibility story: any role that could previously settle up will lose that ability until the permission is granted, and any listing/view screen that relied on the implicit view any check must now be authorized via the maintainable resource. Both are recoverable but should be treated as breaking for the purposes of release notes.
Sequencing
morphs helper in a non-production branch to confirm no morph-map conflict.Maintenance
Pre-1.0 with a terse changelog means every minor bump needs a manual code review. Pin the version in composer.json and treat upgrades as scheduled work rather than routine composer update output.
Support Community-supported, no LTS, no vendor SLA. Institutional knowledge will live with whoever reads the source. Budget for source-level debugging rather than expecting documentation on the new authorization semantics.
Scaling
Authorization checks are per-request and cheap once the permission cache is warm; the polymorphic relation is the scaling concern. Ensure indexes exist on the morph columns (*_type, *_id) for both directions, and watch N+1 queries when resolving maintainable resources across mixed morph types.
Failure modes
view any check or the new settle-up gate.cache:clear.Ramp-up Low for a Laravel developer familiar with policies and polymorphic relations — a few hours to read the source and wire up models. The steeper cost is organizational: product and support need to know that "settle up" is now permission-gated, and whoever owns role definitions must own the new permission.
How can I help you explore Laravel packages today?