scandio/troba
Troba is a lightweight Laravel package from Scandio for adding database-backed search to Eloquent models. It provides a simple searchable trait and query helpers so you can find records without an external search service, keeping setup minimal and search logic close to your models.
Architecture fit. Troba is a standalone, PDO-backed entity manager and query manager with its own base entity class, fluent query builder, and limited relation/lazy-loading support. That responsibility set overlaps Eloquent almost 1:1. It offers no Laravel-native integration points (no service provider, no facade, no queue/event hooks), so the realistic posture is coexistence, not integration: two competing persistence models, two hydration strategies, and two transaction semantics in one codebase. For a greenfield Laravel application the fit is poor. For a narrow, read-mostly reporting module or an inherited legacy codebase, it is technically viable.
Integration feasibility. Composer-installable, and a service provider can bind a Troba session/entity manager singleton around Laravel's existing PDO connection (DB::connection()->getPdo()), avoiding a second connection pool and keeping Laravel's transaction wrapper authoritative. Entity definitions are plain PHP classes/config rather than annotations, which is genuinely easier to review, diff, and audit than attribute-based mapping. The hard blocker is vintage: the package targets PHP 5.5-era idioms and is unvalidated on PHP 8.x, while current Laravel releases require 8.1+. Assume you fork and patch, or you pin an EOL runtime.
Technical risk. High. Archived, ~11 stars, score 0.0575 — effectively no user base, no security response, no issue triage, no release cadence. Supply chain: an unmaintained dependency is a standing CVE and dependency-resolution liability that will eventually fail automated vulnerability gates. Knowledge risk: near-zero public documentation or Q&A, single-maintainer bus factor. Behavioral risk: ORM semantics (identity map, dirty tracking, lazy loading, partial hydration) are subtle, and untested deviations from Laravel conventions surface late, in production.
Key questions.
Stack fit. Poor for the default Laravel stack; acceptable only as an isolated, bounded subsystem where the explicit query builder is a deliberate trade against Eloquent's convenience.
Migration path (inherited codebase). Run this as a strangler-fig exercise, not a rewrite:
Compatibility. Pin the runtime and test against the framework's minimums; expect patches for removed PHP 8 functions (each(), create_function), dynamic-property deprecation, and legacy PDO assumptions. Bind Troba to Laravel's existing PDO so connection count and transactions are not doubled, and verify Troba's transaction API does not nest badly inside DB::transaction. Establish golden-file regression tests before any change.
Sequencing. Week 0–1: feasibility spike, benchmark against Eloquent on representative queries, PHPStan and coverage baseline on the paths you intend to keep. Week 2–3: fork, patch, CI, repository abstraction. Then domain-by-domain migration gated on parity tests. For greenfield work, stop at the spike and record a decision to use Eloquent or Doctrine.
Maintenance. 100% internal ownership from day one. No upstream fixes, no releases — you inherit every defect. Budget a named maintainer, a fork, a patch cadence, and recurring PHP-runtime upgrade work.
Support. No vendor, no community, documentation limited to source. Incident triage depends on one or two people; every framework upgrade touches the fork.
Scaling. PDO is a predictable foundation and the explicit query builder makes SQL review straightforward, so the ORM is unlikely to be the throughput bottleneck. But there is no connection pooling, lazy loading invites N+1, and the identity map can retain entities in long-lived workers (Octane, queue consumers) and leak memory. There is no read/write splitting or query caching comparable to mature ORMs. Validate under Octane explicitly, or confine Troba paths to short-lived requests.
Failure modes.
Ramp-up. Slow start, low ceiling. The API is small and explicit, which helps, but no documentation means read-the-source onboarding, and the entity/query mental model differs from Eloquent, so engineers carry two models. Roughly 3–5 days for a mid-level PHP engineer to be productive, 1–2 weeks to be safe in the internals — and that investment does not transfer to any other system.
Recommendation. Reject for new development. If inherited: contain behind repository abstractions, fork and own it, and plan a 2–4 quarter exit.
How can I help you explore Laravel packages today?