sprocketbox/eloquence
Sprocketbox Eloquence is a Laravel package that extends Eloquent with reusable model traits and helpers, reducing boilerplate by adding common model behavior out of the box. It helps keep models consistent, maintainable, and easy to build.
IdentityManager::flushIdentities() gives the application an explicit reset point for the identity map. This is the difference between "works in a request lifecycle" and "safe to run in a queue worker or persistent process," and it directly feeds the roadmap decision on whether the service is Octane-compatible.Adopt when:
flushIdentities()).Look elsewhere when:
flushIdentities() at the right boundaries (job start/end, after raw queries, after bulk updates). Without that discipline, this becomes a data-correctness risk rather than a performance win.remember() is a better-understood buy.To executives: this is a small, low-cost dependency that removes duplicated database reads inside batch jobs and makes our queue/Octane workloads safe to run in long-lived processes. The 1.1.0 release adds the missing piece — an explicit reset — which converts it from a convenience into something we can responsibly put in production. Cost is a dependency plus a code-review rule; benefit is fewer queries and more predictable memory in background processing.
To engineering: IdentityManager::flushIdentities() clears the identity map on demand. Use it at job boundaries, in test setUp/tearDown, and after any bulk write or raw query that bypasses the mapper. The testbench version fix is housekeeping — it keeps our test harness aligned with the Laravel version we pin. Treat flush placement as part of the definition of done for any feature that touches mapped entities; unflushed state is a stale-read bug waiting to happen.
How can I help you explore Laravel packages today?