dam-bal/eloquentity
A Laravel package that extends Eloquent with entity-style models, helping you separate domain entities from database concerns while keeping familiar query building and relationships. Lightweight integration for cleaner, more maintainable applications.
final from the Eloquentity class specifically so it can be mocked. That is a direct signal the package is intended to sit at a seam that teams unit-test in isolation — the kind of decision that affects your testing strategy and CI ergonomics, not just runtime behavior.Consider it when:
Look elsewhere when:
final widens the extension surface and slightly weakens encapsulation. That is a reasonable trade, but it is a trade, and some architects will want to review it.For executives (30 seconds): This is a small, single-purpose Laravel library that keeps database code out of our business logic — the same separation that makes systems cheaper to change later. The latest release (0.5.3) is a one-line quality-of-life change that makes the library easier to unit-test; it introduces no new features and no breaking changes. It is not a platform bet: it is a narrow utility, currently pre-1.0, so we would adopt it in one team, pin the version, and keep it behind our own interface so we can walk away cheaply. Recommended position: pilot, don't standardize.
For engineering leads: 0.5.3 drops the final keyword from Eloquentity so it can be mocked in unit tests. Two readings matter here. First, the positive: the maintainer is treating testability as a first-class concern, which is a good cultural signal from a small project. Second, the caveat: enabling mocking of a class is often a hint that the class is being used as a collaborator in tests rather than as pure data — worth a short design review of how we'd actually use it before adopting. final removal is non-breaking for consumers and does not alter behavior; it only widens what subclasses and test doubles can do. Low risk, low blast radius.
For the engineering team doing the evaluation: Pin to 0.5.* or exact-version. Write one adapter/facade in our codebase so no application code imports the package directly. Add a test that exercises the mock path so a future re-finalization upstream fails loudly in CI rather than silently. Re-evaluate at the package's 1.0, or if it goes 90 days without a release while we depend on it.
How can I help you explore Laravel packages today?