byrcsc/laravel-assignment
A Laravel package for managing assignments between Eloquent models, letting you attach, reassign, and track assigned records through a simple, configurable API. Lightweight, flexible, and easy to drop into any Laravel project for quick assignment handling.
assignment:tick. Release v1.0.1 is almost entirely about making those loops not silently rot — expired offers now actually notify their assignee, and queue rows for deleted models get cleaned up instead of accumulating forever. That is the difference between a feature we can enable by default and one we have to babysit.offer_expired notification (looks like "the app forgot me"), and an ever-growing queue of orphaned entries (looks like "the tick is slow / the table is huge"). Both generate tickets that look like product bugs but are actually library bugs. Worth folding into our reliability budget rather than building our own.'' vs null role bug is a data-modeling ambiguity we would have replicated: reads filtered on role = '' while writes shared the default slot with null, so assignee('') and assignee() disagreed about the same slot. Having the library reject '' outright means our role handling must be explicit — a decision to encode in our integration layer, not scatter across call sites.assignment:tick), and we want someone else to own the tick/queue/expiry edge cases. Also if we want a library that fails loudly on bad configuration rather than degrading quietly.InvalidArgumentException — including indirectly, because a profile whose offerTtl() returns ≤ 0 now makes autoAssign(), flushQueue(), and assignment:tick throw. A single misconfigured profile can take down the scheduled tick, not just one request. Audit every offerTtl() implementation and every offer()/expiresIn() caller before deploy.'' as a role now throws on both read and write. Search for empty-string roles coming from request input, CSV imports, or nullable columns defaulting to '' — these will move from "works, sort of" to a 500.For executives: v1.0.1 is a stability release for the assignment/offer engine, not a feature release. It fixes three things that were causing silent, ticket-generating failures: users were not being notified when their offer expired, deleted records left permanent junk in the assignment queue, and invalid configuration quietly produced already-expired offers. No new functionality, no user-visible changes, low effort — but it is a patch version with real behavior changes, so we need a short audit before rollout.
For engineering: Four changes, all correctness fixes, all with upgrade implications. (1) Assigning or offering over an expired offer now dispatches OfferExpired, so the assignee actually gets the offer_expired notification. (2) flushQueue() and assignment:tick now delete queue entries whose assignable model no longer exists — previously unbounded queue growth. (3) offer() and expiresIn() throw InvalidArgumentException for TTL below one second; a profile whose offerTtl() returns ≤ 0 will now make autoAssign(), flushQueue(), and assignment:tick throw — this is the highest-risk item, because it can break the scheduled job, so validate all offerTtl() implementations and add a guard/test. (4) Empty-string role now throws on read and write; previously '' shared the default slot with null on write but filtered on role = '' on read, so assignee('') and assignee() silently disagreed. Action items: grep for offerTtl, offer(, expiresIn(, and '' role arguments; add tests for TTL ≤ 0 and empty-role inputs; deploy behind the normal migration window and watch the tick for exception spikes.
How can I help you explore Laravel packages today?